[JBossWS] - Bad mapping from wsdl using wstools
by richard_fagot
Hello,
I used wstools to generate the client side given a WSDL that contains the user types schema. Unfortunately the classes generated do not correspond to what is expected (or what I expect). The FakeType class contains a list of param (as expected) and a list of Item instead of a list of ListType. What's wrong ?
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.siautomation.com/Maestria/schemas/Supervision">
<s:element name="MainType">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FakeType" type="s0:FakeType"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="FakeType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Param" type="s0:Param"/>
<s:element minOccurs="0" maxOccurs="unbounded" name="ItemList" nillable="true" type="s0:ListType"/>
</s:sequence>
</s:complexType>
<s:complexType name="Param">
<s:simpleContent>
<s:extension base="s:string">
<s:attribute name="Name" type="s:string"/>
</s:extension>
</s:simpleContent>
</s:complexType>
<s:complexType name="ListType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Item" type="s0:Item"/>
</s:sequence>
<s:attribute name="Name" type="s:string"/>
</s:complexType>
<s:complexType name="Item">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Param" type="s0:Param"/>
</s:sequence>
<s:attribute name="Name" type="s:string"/>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="MainTypeSoapIn">
<wsdl:part name="parameters" element="s0:MainType"/>
</wsdl:message>
<wsdl:portType name="MyPort">
<wsdl:operation name="MainType">
<wsdl:input message="tns:MainTypeSoapIn"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyPort" type="tns:MyPort">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="MainType">
<soap:operation soapAction="myUrl/MainType" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="MyPort" binding="tns:MyPort">
<soap:address location="URL"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979062#3979062
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979062
18 years, 2 months
[JBossWS] - ServiceLifecycle troubles
by Kimerinn
Hi. I have implemented JSR-109 POJO Endpoint. This endpoint implements ServiceLifecycle interface. But init() method is never invokes. What's wrong?
I am using JBoss 4.0.4. Here is a code:
=============
Endpoint interface:
public interface ClientInterface extends Remote
{
public boolean login(String login, String psw) throws RemoteException;
public void logout() throws RemoteException;
}
==============
Endpoint implementation:
public class ClientInterfaceImpl implements ClientInterface, ServiceLifecycle
{
private ServletEndpointContext context;
public void init(Object object) throws ServiceException
{
this.context = (ServletEndpointContext)context;
}
public void destroy()
{
}
public boolean login(String login, String psw)
{
...
}
public void logout()
{
...
}
}
===========
Web.xml:
<web-app>
<display-name>server8hWeb</display-name>
<servlet-name>ClientInterfaceWS</servlet-name>
<servlet-class>com.logiamobile.server8h.core.ClientInterfaceImpl</servlet-class>
<servlet-mapping>
<servlet-name>ClientInterfaceWS</servlet-name>
<url-pattern>/ClientInterface</url-pattern>
</servlet-mapping>
</web-app>
==============
webservices.xml:
<webservice-description>
<webservice-description-name>server8h</webservice-description-name>
<wsdl-file>WEB-INF/wsdl/server8h.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>ClientInterfacePort</port-component-name>
<wsdl-port>impl:ClientInterfacePort</wsdl-port>
<service-endpoint-interface>com.logiamobile.server8h.core.ClientInterface</service-endpoint-interface>
<service-impl-bean>
<servlet-link>ClientInterfaceWS</servlet-link>
</service-impl-bean>
</port-component>
</webservice-description>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979033#3979033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979033
18 years, 2 months
[JBossWS] - Re: Call invocation failed excepiton when invoking EJB3 WebS
by MmarcoM
hi,
found out that i was uisng wrong namespace..
.but after fixing it.. i got this exception
| creating service....
| Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type map
| ping for: {http://org.jboss.ws/ejb3ws}Agency.Array
| at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataR
| pc(JSR109MetaDataBuilder.java:247)
| at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL
| (JSR109MetaDataBuilder.java:196)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInte
| rnal(JSR109ClientMetaDataBuilder.java:208)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR
| 109ClientMetaDataBuilder.java:126)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR
| 109ClientMetaDataBuilder.java:82)
| at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryIm
| pl.java:157)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryIm
| pl.java:142)
| at ws.jboss.org.samples.jsr181ejb.WSFacadeTester.doTest(WSFacadeTester.j
| ava:49)
| at ws.jboss.org.samples.jsr181ejb.WSFacadeTester.main(WSFacadeTester.jav
| a:36)
|
|
the signature of my webservice is
Agency[] testWebService(Agency[] in) ....
i am usign SOAP RPC, and it is failing to find types.. is it too complex to use RPC? i am going to try literal now... but i am curious to know if someone has find similar problem
found this post
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3978884#3978884
but there is no solution yet......
any help?
thank in advance and regards
Marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978886#3978886
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978886
18 years, 2 months