L.S.,
I think you might have to add a @WebMethod annotation to the getPerson()
method. If a class is annotated with @WebService, all public methods
are part of the SOAP interface and you don't want that for the
setContext() method probably.
Not sure if it has anything to do with the exception you get though...
That is usually solved by specifying the defaultMep attribute on the
HTTP consumer endpoint.
Gert
charliec wrote:
Hello,
I made a copy of the wsdl-first example and renamed it. I then change the
PersonImpl class so it can act as a consumer. I included the following
code:
private javax.jbi.component.ComponentContext context;
public void setContext(javax.jbi.component.ComponentContext context) {
this.context = context;
}
I also modified the xbean.xml as follows:
<jsr181:endpoint >
<jsr181:pojo>
<bean
class="org.apache.servicemix.samples.wsdl_second.PersonImpl">
<property name="context" ref="context" />
</bean>
</jsr181:pojo>
</jsr181:endpoint>
When I execute the client.html, I receive the following error:
STATUS: 500
<?xml version='1.0' encoding='UTF-8'?><env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>javax.jbi.messaging.MessagingException:
Do not understand pattern:
null</faultstring></env:Fault></env:Body></env:Envelope>
When I remove the context code from the Java class and xbean.xml file, it
works fine. Please help. I've attached the source code. Thanks.
http://www.nabble.com/file/p11972224/wsdl-second-3.1.1-incubating-src.zip
wsdl-second-3.1.1-incubating-src.zip