You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Soltysik, Seumas" <Se...@iona.com> on 2006/11/21 02:35:32 UTC
Problem invoking on RPC/Literal WSDL
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() call:
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
Re: Problem invoking on RPC/Literal WSDL
Posted by James Mao <ja...@iona.com>.
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)
sendReceiveData(ComplexType)
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.
Thanks,
James.
> 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() call:
>
> 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
>
>
>
>
>