3 Replies Latest reply on Jun 21, 2006 11:37 AM by Justin Bertram

    How to acess Web service with complex parameters without ser

    Torsten Fink Newbie


      maybe this is a silly question, but nevertheless:

      The question in the short version:

      If I want to access a Web service with a complex signature I need the jaxrpc-mapping file. If I do not use service-reference, how can I configure my code to use the jaxrpc-mapping?

      Now the longer version:

      If I try to access a Web service without using a service-reference, it will look more or less like this:

       String urlstr = "http://localhost:8080/testpurchaseservice?wsdl";
       URL url = new URL(urlstr);
       QName qname = new QName(
       ServiceFactory factory = ServiceFactory.newInstance();
       Service service = factory.createService(url, qname);
       PurchaseServiceSEI purchaseService = (PurchaseServiceSEI) service

      If the signature of my SEI is more complex, e.g. contains this method

       PurchaseResult purchase(Customer customer, Product product) throws RemoteException;

      I need to map the XML parts to Java objects.

      This mapping is declared in the jaxrpc-mapping.xml file.
      But I do not specify this file in the code above, nor do I see a possibility to do this.

      I thought about using the type mapping registry. But this seems to complicated, expecially if I already have a jaxrpc-mapping.xml.

      Can anybody give me a hint to the right way of doing this?
      (I know that I can specify the mapping file in the service-ref.)

      Best regards,

      Torsten Fink