File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Difference Tags of Input XML sent and that recieved on the server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Difference Tags of Input XML sent and that recieved on the server" Watch "Difference Tags of Input XML sent and that recieved on the server" New topic
Author

Difference Tags of Input XML sent and that recieved on the server

Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
Hi Friends,

I created a web service having some tags.

I expected a tag fname. But the tag that the client is sending is <FirstName>
and to my surprise the value that I recieve on my server side in fname tag is the same as the client has supplied in FirstName tag.

My question is,
1) how and where does this mapping of FirstName to fname happens?
2) Also some data that client cliams that he has sent, has not reached the server.
3) Some of the tags are coming as blank, when recorded at the server side through Handler.
4) Some of the data in the tags has got changed. For example: Client says, he has sent <Branch>1</Branch> and on my server, I have recieved <branch>376</branch>

Can someone please give me a clue, why such a situation has occured?

The tag names should remain same irrespective of the client. Isn't it???

Regards
Yogesh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41792
    
  62
I don't think we can answer any of these question without knowing a lot more about how both the client and the server are implemented.


Ping & DNS - my free Android networking tools app
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
I agree to your concern. But I have not worked much on webservices.

Though I know, how to generate client from WSDL.
In my practical experience, I had never seen the tags getting changed when a user generates CLIENT from a WSDL.

What help, I wanted from you is, that if any of you guys have generated client using different frameworks available for generating client, like axis2, .net etc. Then is there a change in the tag names that your client generates and what is being used on the server?

Presently, I don't even know, what framework my user has used to generate the client. Though server is in my control, and we are running the server on websphere.

If required, I can share the SOAP version and other specifications of my WSDL.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41792
    
  62
Let's take a step back and ask: why does it matter what the tags are called, as long as everyhing works? SOAP and WSDL abstract away that kind of detail.
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
Yes, you are right.
It should not matter to me as long as I recieve correct data on the server in the correct tags.

But that is what is not happening.

XML sent by Client.



XML recieved on the server



As you can clearly notice, there are many tags, whose value is not recieved on the server. Many tags whose value has been recieved incorrectly.

I have placed a handler on my side, via which I am recording, what content I am recieving on the server.

Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
XML sent by client.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference Tags of Input XML sent and that recieved on the server