Here is the stub that works

 
private static final QName SERVICE_NAME = new
QName("http://blah.com","MyService";);
private static final QName PORT_NAME = new QName("http://blah.com";,
"MyPort");

javax.xml.ws.Service service = Service.create(SERVICE_NAME);
service.addPort(PORT_NAME, avax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING,
portUrl);        

MyService port = service.getPort(PORT_NAME,MyService .class);


--Vijay

On 5/9/08 2:17 AM, "philgmo" <[EMAIL PROTECTED]> wrote:

> 
> I apologize if this has been answered before.  I tried searching, but haven't
> found exactly what I'm looking for.
> 
> I'm trying to implement a client to a SOAP service that doesn't need to load
> the WSDL file.  I've generated stub client classes with wsdl2java (using cxf
> 2.0.5).
> 
> This is basically what I'm doing...
> 
> QName serviceName = new QName("http://www.blah.org";, "MyService");
> MyService service = new MyService(null, serviceName);
> 
> QName portName = new QName("http://www.blah.org";, "MyPort");
> service.addPort(portName, "http://schemas.xmlsoap.org/soap/";, portURL);
> PortType myPort = service.getPort(portName, PortType.class);
> 
> When I try calling a method on myPort, I get an exception:
> javax.xml.ws.soap.SOAPFaultException: Found element metadata but could not
> find matching RPC/Literal part
> 
> When I debug and look at the fields of service, I see that after running
> addPort, it adds a record to the service.portInfos map, but not
> service.ports.  Any help would be greatly appreciated!
> 
> Thanks. 

Reply via email to