I am very new to Web services. Since one week I am struggling to configure the web services client and make it work.
I am given .asmx?wsdl (developed in .Net) with which I need to configure the web services client. test() method is written which is taking integer parameter as input and returns a Dime attachment as output. I am using WSAD at client side.
While configuring client in WSAD, I selected Client Proxy type as 'Java Proxy' and Webservice runtime as 'Apache Axis 1.0'. Sample code is generated after completion. TestClient.jsp is having the code to call various methods. In that test() method is passing integer parameter mentioned and the return parameter is read using DOMwriter().
I have following doubts regarding all this:
1.Does Java supports reading and displaying Dime Attachments? If Yes, How can I read Dime attachment (Actual content to be passed is PDF document). Any sample code would be greatly appreciated. 2.How to test whether parameter is being passed to web services server correctly or not?
Any help in this regard would be great for me to start.
On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name. Since yours does not conform with it, please take a moment to change it, which you can do right here.
Enjoy your time here.
Ping & DNS - updated with new look and Ping home screen widget
Thank you for the response. I have gone through the msdn link provided. It is giving the information regarding the .Net Server and .Net client but I am looking for reading dime attachment from Java client which is sent by .Net web services server.
Could you please guide me in that way.
Joined: Aug 19, 2005
I'd focus on the IBM article (the MSDN article is useful to see if you can get a .NET client to work - else you may be looking at a totally different kind of problem).
Extend handlers to support both MIME and DIME Although it is not advertised or documented in the Application Server implementation, a SOAP message is based on the com.ibm.ws.webservices.engine.Message class which supports both MIME and DIME attachments. For the incoming messages, it examines HTTP content headers and builds a SOAP message correctly regardless of the attachment's type. Analogous to an AXIS implementation, this class allows querying of the attachment type of the incoming message
You may also want to look at the Fear of Attachments article that was mentioned in the IBM article � though it relates to Axis rather than WebSphere.
I just recently overcame this problem myself, it's quite easy once you know how to do it.
A basic .NET service is going to look something like this: //put attachment on context
So basically all your service is doing is adding the attachment right on to the response context. Therefore, all you need to do in the client is grab that response context and pull the attachments off of it.
Here's what a simple Java client would look like (Axis 1.4):
Then just go through your iterator and cast your attachments as necessary