axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Re: using jaxbri binding
Date Fri, 11 Mar 2011 06:33:53 GMT
Ok, may be I need to include more details, and include the soap.
The binding is done with jaxb. The command to generate the stubs is:

wsdl2java.sh -uri
"http://akkatech.com/webtools/control/SOAPService/findProductById?wsdl"
-d jaxbri -o generated

When I access it, while debugging in eclipse, I can see the response
obtained correctely. However, after unmarshalling I get null results. Is
this a bug, or I am missing something.

    @Test
    public void testGetProduct() throws RemoteException {
            MapMap map = new MapMap();
            map.getMapEntry().add(createEntry("userLogin", "ofbiz"));
            map.getMapEntry().add(createEntry("idToFind", "PIZZA"));
            map.getMapEntry().add(createEntry("login.username", "admin"));
            map.getMapEntry().add(createEntry("login.password", "ofbiz"));
            FindProductById service = new FindProductById();
            service.setMapMap(map);
            FindProductByIdStub byId;
            byId = new FindProductByIdStub();
            FindProductByIdResponse response;
            response = byId.findProductById(service);
            assertNotNull(response);
            MapMap m1 = response.getMapMap();
            assertNotNull(m1);
    }

    private MapEntry createEntry(String key, String value) {

            StdString strKey = new StdString();
            strKey.setValue(key);
            MapKey mapKey = new MapKey();
            mapKey.setStdString(strKey);

            StdString strValue = new StdString();
            strValue.setValue(value);
            MapValue mapValue = new MapValue();
            mapValue.setStdString(strValue);

            MapEntry entry = new MapEntry();
            entry.setMapKey(mapKey);
            entry.setMapValue(mapValue);

            return entry;
    }

I am really stuck on this.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message