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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top