cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soltysik, Seumas" <>
Subject RE: Problem invoking on RPC/Literal WSDL
Date Tue, 21 Nov 2006 03:08:08 GMT
Hi James,
I am using the JaxWsServiceFactoryBean so that I can set the WSDL location dynamically for
the server. I looked at the hello_world_RPCLit.wsdl and cannot see any obvious differences.
I am wondering if the problem is related to how I am creating the Server. I am going to compare
how the server is create with how it is done in the EndpointImpl class.

-----Original Message-----
From: James Mao []
Sent: Monday, November 20, 2006 9:19 PM
Subject: Re: Problem invoking on RPC/Literal WSDL

Hi Seumas,

For a JaxWs server i don't think it's necessary  for a user to use the 
JaxWsServiceFactoryBean to setup a server, can you explain why?

We do have a demo under samples dir in the latest kit, and it show us 
the three well known operation, sayHi() greetMe(String)  
Demo name is hello_world_RPCLit, i think the sayHi operation has no 
input as well.
But  i don't know if it's wsdl also looks same or similar.
So can you  provide the wsdl and also create a jira issue.

I also met a strange RPC/Lit problem myself when i pair with a STP guy, 
the wsdl used fine in the kit, but fail in the Eclipse.

> I have set up a Server using the following code:
>         JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
>         serviceFactory.setBus(bus);
>         serviceFactory.setInvoker(new JAXWSMethodInvoker(impl));
>         serviceFactory.setServiceClass(impl.getClass());
>         serviceFactory.setWsdlURL(wsdlLoc);
>         JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
>         serverFactory.setServiceFactory(serviceFactory);
>         serverFactory.setBus(bus);
>         serverFactory.setEndpointName(new QName(portName));
>         serverFactory.setAddress(address);
>         serverFactory.setServiceClass(impl.getClass());
>         serverFactory.create();
> The following code in BareInInterceptor is throwing an exception:
>             if (msgInfo != null && msgInfo.getMessageParts() != null) {
>                 assert msgInfo.getMessageParts().size() > paramNum;
>                 p = msgInfo.getMessageParts().get(paramNum);
>             } else {
>                 p = findMessagePart(exchange, ops, elName, client, paramNum);
>             }
>             if (p == null) {
>  ----->               throw new Fault(new org.apache.cxf.common.i18n.Message("NO_PART_FOUND",
BUNDLE, elName));
>             }
> The problem seems to stem from the following code in the AbstractPhaseInterceptor::findMessageParts()
>             Collection bodyParts = msgInfo.getMessageParts();
>             if (bodyParts.size() == 0 || bodyParts.size() <= index) {
>                 itr.remove();
>                 continue;
>             }
> The Web service call is RPC/Literal and there are no IN parts defined in the message
defined in the WSDL, so this code passes over the correct operation that it is looking for.
> I have a feeling that the problem I am seeing is related to the fact that I am using
a RPC/Literal WSDL. Other WSDLs that are Doc/Literal do not seem to have this problem.
> Any ideas what is going on?
> Thanks,
> Seumas

View raw message