Pengju Cheng

Greenhorn
+ Follow
since Dec 30, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pengju Cheng

I'm trying to use Axis1.4 to generate some proxy class to try my luck but I got this error:

......
[Loaded java.text.MessageFormat$Field from shared objects file]
java.io.IOException: Element myException is referenced but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
Table.java:670)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545
)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)


However, the wsdl file I have does contain the following part, isn't it the definition?

<wsdl:types>
<xsd:schema targetNamespace="urn:Genus" xmlns:cmi="urn:Genus">
<!-- fault element -->
<xsd:element name="myException">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="faultcode" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="false"/>
<xsd:element name="faultstring" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="false"/>
<xsd:element name="detail" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="false"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>

14 years ago
Hi All,
I'm totally new to web services and I'm stuck with a urgent development task and hope to get help.

This is a piece of code that will be running on the application server side, there will be hundreds of devices each has its own IP address, but runs exactly the same web services, and my code will need to talk to each of the selected ones using its IP address. I see that in some cases the generated proxy class contain the particular IP of the device where the web service is running on. If this is the case all the time, then it won't be possible for me to use a client proxy class to talk to all the devices?

I'm currently trying something like this that will allow the code to use an IP 'dynamically':

URL url = new URL("http://172.21.159.52:80/cmi?wsdl");
QName serviceName = new QName("urn:Genus", "genusService");
Service service = Service.create(url, serviceName);
//These are for testing purpose
System.out.println ("List of QNames of service endpoints:");
Iterator it = service.getPorts();
while (it.hasNext ()) {
System.out.println (" " + it.next());


I can see the single service named 'genusPortType' in the output, however when the following code is reached:

QName portName = new QName("urn:Genus", "genusPortType");
Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class,Service.Mode.MESSAGE);

I got an error 'javax.xml.ws.WebServiceException: Illegal argument combination [type=javax.xml.soap.SOAPMessage,mode=MESSAGE]'. I'm confused because I see the same usage in lots of sample codes. Is it because the 'portName' part decides that these two parameters are not fit based upon the definition of 'genusPortType'? If the operation is defined like this in the wsdl file, wht values should I use?

(I have to put an extra space between ':' and 'o' to make it not shown as a '')

<wsdl:binding name="genusBinding" type="cmi:genusPortType">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<!-- login operation -->
<wsdl: operation name="login" >
<wsdlsoap: operation soapAction="com.controlmod.terminal.services.web.services.Login#Login" />
<wsdl:input name="loginRequest" >
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" />
</wsdl:input>
<wsdl: output name="loginResponse" >
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" />
</wsdl: output>
</wsdl: operation>
.............
14 years ago