svcutil service contractor and data contractor - web-services

I would like to know is it possible to generate internal service contract classes and public data contract classes for a wcf service using svcutil commandline?

svcutil can be used to extract the public data contract classes that are used in the methods that are exposed by the service.
See: https://msdn.microsoft.com/en-us/library/aa702581(v=vs.110).aspx
If you need to extract classes that are only used internally in the service you could use a decompiler such as jetbrains dotpeek.

Related

Invoking REST API using Oracle SOA Suite

Did anyone worked on calling REST webservice for sending the Json Payload information to Azure Public Cloud from Oracle SOA Suite. Can anyone guide me on how to achieve this functionality as i am new to Oracle SOA Suite.
How did you call the REST API from oracle soa suite?Oracle SOA Suite supports REST Adapter to invoke REST API.Can you please post the error if you have used REST adapter in soa suite?
Assuming that you are using the Rest Adapter and invoking it using the invoke component in the BPEL, you can modify the headers by double-clicking on the invoke component then selecting the headers tab. There you can select a header variable that you already filled with the authentication details needed.
Another option that is not recommended but will do the trick for you is to use the java embedded component in the BPEL and use it to write pure Java code to call the API.

Liferay 7 Service Builder without creating database table and will call/invoke/consume RESTful web services API

I'm implementing Liferay 7 Service Builder which should not create database table and will call RESTful web services API. The web services to be invoked are custom and outside the Liferay; they have nothing to do with Liferay at all. The web services provide JSON format data to Service Builder. The Service Builder shall map it to its generated POJO class, and by using Jackson library would convert it back to JSON string. The portlet which would call the Service Builder (XxxServiceImpl) converts the JSON string to POJO object and render it on JSP.
I've search the world wide web to no avail. I hope anybody can help me.
Thank you.
By creating an empty entity, you'll get the services generated for you, though with no model classes - they'd be up to you to create yourself:
<service-builder package-path="com.example.foo">
<namespace>FOO</namespace>
<entity name="Foo" local-service="true" remote-service="true">
</entity>
</service-builder>
This will generate FooService, FooLocalService and the matching implementation classes, but no FooModel etc. - as this is something that you'd persist yourself anyways, you can (and should) build the model classes on your own. Liferay's ServiceBuilder would help you with the database persistence, but not with any other persistence.

Web Service Connection Fails After It is Ported To WCF

I am the developer of an application which is the consumer of an in-house developed web service. The web service was originally developed in Java and deployed in JBoss.
Recently, I have been notified that the web service had been completely ported to .NET WCF. I simply updated the web service endpoint URI string in my configuration file, but my application has failed to connect to the new web service.
Upon comparing the old and new WSDLs, I can see that the methods and the structures are the same, but somehow the namespaces and the internal structures of arrays are different.
What do you suggest so that my application would be compatible with the new web service?
Thank you very much.
Namespace change means the WSDL of both Java Web service and WCF service are different. You know in programming classes of the same name but in different namespaces are totally different classes. Likewise, though the method signatures and data signatures look the same, however, in different XML namespace of WSDL, they are different contracts. Thus on your client side, you should have new set of proxy classes to talk the the WCF service.
You may ask the developers of the Web services about what were the intend of changing Xml namespace in WSDL. If for the co-existence of both Java Web service and Wcf Web service and enforcing some changes on client side, you MUST generated new proxy classes against the new WSDL, and it is recommended to use svcutil.exe rather than Service Reference in IDE so you have fine gained control over CLR namespace mapping to Xml namespace.
If the service developer could reverse the change the Xml namespace of WSDL for good reasons and the WSDL could remain the same, you just need to change only URL.

Consume web service without adding service reference in C# 4.0

Is there any existing way to consume web services (SOAP, JSON, etc.) leveraging dynamic keyword from C# 4.0?
I'm looking for as lightweight implementation as possible (without calling wsdl.exe or such).
You can just share the contract (the interface) between the client and server. Then the ChannelFactory class will allow you to create communication channels to the server based on either pure code or a configuration file (app or web.config).

EJB 3 | Entities with webservices

I want to access a inventory system which is accessible through webservice, What is the best way to integrate, I thought of directly expose the entity facade as a web service using #WebSerive it's possible but don't know whether it's a good approach or not, need some advice.
Thanks.
You could eventually define the methods to be exposed in the same class (or maybe create a wrapper).
My understanding is that you want to consume a web service i.e. to implement a web service client. My recommendation would be to use JAX-WS for this. See :
A Simple JAX-WS Client in the Java EE 5 Tutorial
Developing JAX-WS Web Service Clients