[JBossWS] - Cannot obtain java type mapping
by gapesteguia
I want to use the following code in order to inkoke the USZip web service, but I got the exception:
org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://www.webserviceX.NET}>GetInfoByZIP
I'm using jboss-4.2.1.GA. Could anyone help me ?.
Thanks
| public class CallWS {
| String result;
| public String CallUSZipCode() {
| try
|
| {
|
| URL url = new URL("http://www.webservicex.net/uszip.asmx?wsdl");
| String targetNamespace = "http://www.webserviceX.NET";
| QName serviceName = new QName(targetNamespace, "USZip");
| QName portName = new QName(targetNamespace, "USZipHttpGet");
| QName operationName = new QName(targetNamespace, "getInfoByZip");
|
| // create service
| ServiceFactory factory = ServiceFactory.newInstance();
|
| Service service = factory.createService(url, serviceName);
|
| // create call
| Call call = service.createCall(portName, operationName);
| // invoke the remote web service
| result = (String) call.invoke(new Object[] {"75080"});
| //System.out.println(result);
|
| } catch(Exception e){
| System.out.println(e);
| result = e.toString();
| }
|
| return (result);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066450#4066450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066450
17 years, 7 months
[JBossWS] - jbossws 1.2.1 xml typing problem
by gryffin
I've got a web service that accepts a complex type as a parameter. It works with a JBossWS client, but I need it to work for an Axis client whcih is failing. We both used the same WSDL for our clients, and the service was built consuming the same WSDL.
Specifically, JBoss fails to marshall the DeviceData and AssetData objects. I can't find anything wrong with the format or schema implementation Axis uses. It looks fine, but JBoss throws an error when trying to access the children of the SelectionValues portion.
DeviceData dd = associationValues.getDeviceData() works
dd.getDeviceList() fails
Here's the SOAP envelope that Axis generates:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <soapenv:Envelope
| xmnls:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
| xmnls:xsd="http://www.w3.org/2001/XMLSchema"
| xmnls:xsi="http://www.w3.org/2001/XMLSchema-instance"
| >
| <soapenv:Body>
| <assetAssociationSet
| xmlns="http://www.example.com/NLS/soap"
| >
| <Selector
| xmlns=""
| >
| <ns1:AssetId
| xmlns:ns1="http://www.example.com/NLS/ns/soapTypes"
| >
| 3M0000I</ns1:AssetId>
| <ns2:OwnerAppId
| xmlns:ns2="http://www.example.com/NLS/ns/soapTypes"
| >
| TOOLING</ns2:OwnerAppId>
| </Selector>
| <AssociationValues
| CreateDeviceAssociations="any"
| DeleteOtherDeviceAssociations="false"
| xmlns=""
| >
| <ns3:DeviceData
| xmlns:ns3="http://www.example.com/NLS/ns/Types"
| >
| <ns3:Device>
| <ns3:AeroScoutTag
| MacId="494949494949"
| />
| </ns3:Device>
| </ns3:DeviceData>
| <ns4:AssetData
| AssetId="3M0000I"
| OwnerAppId="TOOLING"
| Version="0.1.0"
| xmlns:ns4="http://www.example.com/NLS/ns/Types"
| >
| <ns4:AssetDisplayName>17P7W3261-501</ns4:AssetDisplayName>
| <ns4:AssetCategory>/TOOLING</ns4:AssetCategory>
| <ns4:AssetDescription>3M0000I</ns4:AssetDescription>
| <ns4:AssetSuspended>false</ns4:AssetSuspended>
| </ns4:AssetData>
| </AssociationValues>
| </assetAssociationSet>
| </soapenv:Body>
| </soapenv:Envelope>
|
Here's the JBossWS client call:
| <env:Envelope
| xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
| >
| <env:Header></env:Header>
| <env:Body>
| <ns1:assetAssociationSet
| xmlns:ns1='http://www.example.com/NLS/soap'
| >
| <Selector
| xmlns:ns2="http://www.example.com/NLS/ns/soapTypes"
| >
| <ns2:AssetId>devAssetId</ns2:AssetId>
| <ns2:OwnerAppId>devOwnerAppId</ns2:OwnerAppId>
| </Selector>
| <AssociationValues
| xmlns:ns2="http://www.example.com/NLS/ns/soapTypes"
| xmlns:ns3="http://www.example.com/NLS/ns/Types"
| DeleteOtherDeviceAssociations="true"
| CreateDeviceAssociations="ANY"
| >
| <ns2:DeviceData
| Version="0.3.0"
| >
| <ns3:Device>
| <ns3:AeroScoutTag MacId="000CCC1111f0">
| <ns3:BatteryStatus>low</ns3:BatteryStatus>
| </ns3:AeroScoutTag>
| </ns3:Device>
| </ns2:DeviceData>
| <ns2:AssetData
| Version="0.3.0"
| OwnerAppId="devOwnerAppId"
| AssetId="devAssetId"
| >
| <ns3:AssetDisplayName>Stunt Asset</ns3:AssetDisplayName>
| <ns3:AssetCategory>/devTop1/dev1-b/dev1-b-2/dev1-b-2-a</ns3:AssetCategory>
| <ns3:AssetDescription> dev asset</ns3:AssetDescription>
| <ns3:AssetSuspended>true</ns3:AssetSuspended>
| </ns2:AssetData>
| </AssociationValues>
| </ns1:assetAssociationSet>
| </env:Body>
| </env:Envelope>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066299#4066299
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066299
17 years, 7 months
[JBossWS] - trying to access a webservice - not working from either java
by rodgerca
Webservice has deployed fine on jboss 4.2
BUT
>From java client I get this at the ServiceFactory.createService() call
Starting Test Client
Creating a service Using:
http://127.0.0.1:8080/echo/EchoBean?wsdl
and {http://session.address.cmmgroup.com/}EchoService
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/ws/addressing/AddressingProperties
at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:107)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at com.cmmgroup.address.client.EchoClient.main(EchoClient.java:23)
>From SOAPUI I get this (on the server, at least it is actually reaching the server!)
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
I could send you my code but I pretty sure its ok - lifted straight from a web example. Also pretty sure my classpaths are ok - jboss-wsclient.jar, etc...
Please help, I've been trying to fix this for about two days....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066230#4066230
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066230
17 years, 7 months
[JBossWS] - JBossWS 2.0 cannot handle inhertiance
by koganty
I am running JBoss 4.0.5 with JBossWS 2.0 with JDK 1.6.
JBossWS looks like cannot handle inheritance.
I have a class GetAllQueryRequest which extends QueryRequest which extends Request.
I have an EJB3 SLSB with methods :
@WebMethod
public Response executeSyncRequest(Request request)
@WebMethod
public QueryResponse executeSyncRequest1(QueryRequest request)
@WebMethod
public GetAllQueryResponse executeSyncRequest2(GetAllQueryRequest request)
When I generate the stubs on the client and in Test code call :
GetAllQueryRequest req = new ObjectFactory().createGetAllQueryRequest();
GetAllQueryResponse resp = (GetAllQueryResponse)bean.executeSyncRequest(req);
Eventhough I'm passing GetAllQueryRequest objecton the client..I'm just receiving the Request object on the server side.
Am I missing something or is this a bug?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066011#4066011
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066011
17 years, 7 months