Not sure if you guys are familiar with Integration Server 4.6, but I just wanted to give you the cliff notes on how easy it is to create a WSDL document from a flow and to create a flow connector from a WSDL document:
How to turn an existing service into a Web Service
Select the service you want to create a Web Service from and choose “Generate WSD…” from the “Compose” menu.
When the option screen comes up, select your options and click ok (the default values are fine).
Select a location to save the WSDL file
How to connect to a Web Service
Click the “New…” button on the menu toolbar and select “Web Service Connector”
Choose a folder where you want the Web Service to be saved
Choose a WSDL file (note that you can paste in a URL to a WSDL file!) and click OK to generate the Connector
Hi…Anyone created a Web Service from a webMethods service that returns a file (any files like .pdf, .txt, .html, etc). My understanding from the documentation is that the webMethods support for Web Service creation expects an XML document (or String) as the output of the service, whether we use SOAP message or HTTP POST as the transport protocol. Also I could not find any supporting services which allows to add an attachment to a SOAP message (though there are services to add Header and Body).
My requirement is to create a Web Service from a webMethods Service which returns a file (it can be .pdf, .txt or .html). Is there a way in webMethods?
The are two major types of SOAP interaction that wM IS supports: SOAP-RPC and SOAP-MSG.
With SOAP-RPC the focus is on invoking a particular service with specific input and output parameters. The wM SOAP-RPC processor does the de-enveloping/enveloping and parameter marshalling work for you. You don’t have to deal with SOAP things at all within your service.
With SOAP-MSG there is a bit more work you have to do. The SOAP processor, either the built-in processor or your custom made processor, expects SOAP docs as input and output. This means you get to pull the SOAP body or bodies from the inbound doc, and generate the outboud SOAP doc, putting your content in the appropriate body/bodies.
A SOAP body can hold anything. While not referred to as an attachment per se, you can place .pdf, .txt, .html, etc. data in the body. You need to set the appropriate tags so that the receiving system knows what it is getting.
The webMethods SOAP Programming Guide is a good source of information. Focus on the SOAP-MSG section. It should provide help for what you’re trying to do.
Thanks to Rob and Fred for your valuable inputs…
I have done it with SOAP-RPC and Base64 encoding. It works…
I used the services under pub.string for Base64 encoding.
Is it not possible to transport a file without base64 encoding?
By the way, Fred, where can I find the API methods you mentioned for Base64 encoding? I could not find a package named com.wm.util.Base64 in the API documentation for webMethods 4.6.
ooops. I thought com.wm.util.Base64 was a publically documented class in client.jar. Never mind.
There isn’t a good reason to call the underlying Java class when there is a service that surfaces a public way to access the operation. The overhead of a service call will be offset by the amount of time it takes to base64 encode a reasonable sized file.
Note that most binary files are base64 encoded in mime messages, so all in all it is a reasonable way to encode.
There is a hexBinary type in Soap RPC, but that creates bigger results than base64.
I have even set the watt.net.timeout=600, but still Im getting the same exception.
I have provided all the necessary inputs and even the host/function names are valid.
You can check the required inputs to the connector on the webpage - “[url=“http://weather.gov/xml/”]http://weather.gov/xml/[/url]”.
Why am I getting this error when Im trying to test the webservice connector. I’ve uploaded the package also for your reference.
Something is preventing you from getting to the weather.gov server. I just tried the same from my location by running the connector stand-alone and it worked fine.
Did you hit the weather.gov web site directly to create your connector, or did you get the WSDL file from somewhere else?
I have created the webservice connector using the WSDL file directly from the weather.gov web site.
Did you try testing using the package that I have attached in the query.
If it is working fine for you then what can be the problem when I’m trying to access the same. Can it be because of some firewall setting that needs to be done or some Sevice Pack/fixes that I need to install (I already have FP1 and FP2 installed).