wood burning stoves 2.0*
The moose likes Web Services and the fly likes Need to change the Tag name of Response Tag. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need to change the Tag name of Response Tag." Watch "Need to change the Tag name of Response Tag." New topic
Author

Need to change the Tag name of Response Tag.

Mukesh Puri
Greenhorn

Joined: Sep 01, 2009
Posts: 9
Hello,

While creating the Wsdl in eclipes, in which,I put operation name is (PX_GET_INSTPRD) Then automatically get its elements for input= (PX_GET_INSTPRD) and for output (PX_GET_INSTPRDResponse). I change the output element to PX_GET_INSTPRD_RESP, and proceed further, creating new types and element.

After completing it, converting it to JAVA and deployed in tomcat, When i verfying the response in soupUI, I get PX_GET_INSTPRDResponse tag instead of PX_GET_INSTPRD_RESP.

Will anyone please help me out, in getting correct response tag (PX_GET_INSTPRD_RESP)? And also explain why only main response tag change rest tag remain same??

Thanks in advance
Mukesh Puri
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Suppose your WSDL looks something like this



Now did you change it like this



I think this should work (its given in my book but I've never tried it )...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Mukesh Puri
Greenhorn

Joined: Sep 01, 2009
Posts: 9
Hey Thanks for the rply

I tried the same thing, before, but its of no use, still getting the same PX_GET_INSTPRDResponse tag instead of PX_GET_INSTPRD_RESP.

Is there any other way to solve the issues.


Thankz
Mukesh Puri
Mukesh Puri
Greenhorn

Joined: Sep 01, 2009
Posts: 9
Hello All,

Can anyone help me out, in solving my problem of Response tag of webservices, I tried a lot but not able to solve the problem

Please help me....

Regards
Mukesh Puri
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Are you doing Java-first development or WSDL-first development?
Also, are you developing a document-style or an rpc-style web service?
The above questions very much influence how to answer your question.
Best wishes!
Mukesh Puri
Greenhorn

Joined: Sep 01, 2009
Posts: 9
Hello,

I am doing WSDL-first development using a document-style. My operation name and input name is same PX_GET_INSTPRD and output name I required PX_GET_INSTPRD_RESP, but every time getting PX_GET_INSTPRDResponse by default.

regards,
Mukesh Puri
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I don't know if this overlaps with what Ankit Garg suggested, but have you tried to change the name of the <complexType> elements and the global element declarations in the <types> section in the WSDL (alternatively, these type definitions can be found in a separate XML schema file imported into the WSDL).
Best wishes!
Mukesh Puri
Greenhorn

Joined: Sep 01, 2009
Posts: 9
hello Ivan,

Yes I have tried, to change the name of the <complexType> elements and the global element declarations in the <types> section in the WSDL. Still i am not able to get the desire result.

Regards
Mukesh
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Well, if you tried to change the name of the <complexType> and the global element in the XML schema but still does not get the result you want, then you must be using another XML schema. Make sure that the deployed web service's WSDL is indeed what you expect.
Clear any caches in which old versions of your WSDL (and accompanying XML schemas) can be stored.
Clean the Eclipse project (from within Eclipse, in the Projects menu) and rebuild it.
What web service stack are you using?
Best wishes!
 
jQuery in Action, 2nd edition
 
subject: Need to change the Tag name of Response Tag.
 
Similar Threads
how to change the xml tag name using xslt
change result xml element name
How to change name of hidden text field dynamically
Issue with Struts Global Forward
JspWriter