- This topic has 4 replies, 4 voices, and was last updated 17 years, 6 months ago by tomeksz.
-
AuthorPosts
-
Lee HarringtonMemberI’ve created a web service using the web service project type. When I look at the WSDL I see:
– <xsd:sequence>
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in0″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in1″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in2″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in3″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in4″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in5″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in6″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in7″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in8″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in9″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in10″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in11″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in12″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in13″ nillable=”true” type=”xsd:string” />
<xsd:element maxOccurs=”1″ minOccurs=”1″ name=”in14″ nillable=”true” type=”xsd:string” />
</xsd:sequence>What would I need to do to have name="incidentid" ect. for my class is:
public String example(String source,
String incidentid,
String alertid,
String alerttype,
String fromclli,
String toclli,
String starttime,
String endtime,
String duration,
String alarmedentity,
String alertattributes,
String descstatlist,
String impstattotlist,
String impstatmonlist,
String tsgs);Lee
Riyad KallaMemberLee,
I’ve asked someone to follow up with you, but they are quite busy at the moment.
RussMemberLee:
I take it from your question you are doing a “bottom-up” approach to your web service. In this case, what I have had to do is go into the WSDL and manually change the reference element names to match a specific naming convention so I could at least understand each input. There is one place in the WSDL where you need to look–types. What you should see is an element definition for the method. Within this element, you should see children elements which makeup a complex type. These children elements will be the parameter names.
If you need more specific information, it might be best to post just the portion (recall the WSDL has several sections involving this one method) of your WSDL that deals with this specific method.
I hope this helps you get underway with your coding effort in Web Service. Best of luck to you!
Russ
Lee HarringtonMemberThanks for the reply. I guess my next question is “where is the WSDL” that I’d need to modify. I can view my wsdl via: http://localhost:8080/NOCEMServices/services/MaoMooService?wsdl
And looking at my MaoMooService class — I don’t see any methods for wsdl. Nor is there a *.wsdl anywhere to be found.
I’m betting that xfire creates this on the fly.
Lee
tomekszMemberYes, XFire creates WSDL dynamically. But you can control it with e.g. JSR-181 annotations.
Use @WebParam(name=”myparamname” ) for every parameter. -
AuthorPosts