wsdl qname

M

Mike Gaab

I can't seem to get the parameter correct for retrieving
a Message from a Definition.

Here is a snippet from the wsdl file.

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="HelloService"
targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
...
<message name="SayHelloRequest">
<part name="body" element="tns:SayHello_"/>
</message>
....

Here is a snippet from the code:

Parser p = new Parser();
p.run("awsdl filename");
Definition d = p.getCurrentDefinition();
String qnStr =
"{http://www.ecerami.com/wsdl/HelloService.wsdl}SayHelloRequest";
//I have also tried just "SayHelloRequest", still a null is output.
QName qn = new QName(qnStr);
Message m = def.getMessage(qn);

System.out.println(m);

After executing the above I get a null as output.

Thanks, Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top