views:

310

answers:

1

I'm testing JAX-WS to access the Oracle IRM web serviecs. I can get it to work just fine with AXIS so this isn't an Oracle problem.

What's happening is that I'm getting the following error when making the call:

Expected xsd:anyType - unknown type provided

If I look at the SOAP packet is sent I see that the owner tag is blank under JAX-WS:

<ns1:browseAccounts>
    <owner/>
    <accountType>All</accountType>
</ns1:browseAccounts>

The same piece under AXIS is this:

<owner xsi:type="ns1:LicenseServer" 
       xmlns="" 
       xmlns:ns1="http://www.sealedmedia.com/ls/server/schema"&gt;
    <serverKey>#############</serverKey>
</owner>

Obviously the owner tag is not getting properly created, this is what I'm using to create that:

AccountServicesPort AA = ORI.getAccountServices();
LicenseServer LicSer = new LicenseServer();
LicSer.setServerKey("#######################");
List<Account> Acts = AA.browseAccounts(LicSer,AccountAccountType.ALL);

Is there some other process that I need to go through to create the object properly?

EDIT

I thought maybe running the LicenseServer creation through ObjectFactory would help. Unfortunately, it doesn't.

A: 

Despite the Oracle IRM documentation stating that BrowseAccounts accepts either a LicenseServer object or a Context object for the owner parameter it actually accepts an LicenseServer_ref.

EDIT Further, I was running JAX-WS under JDK 1.6.0 which is a lower version than JDK 1.6.0_14. The new version supports XMLSeeAlso annotation which allowed JAX-WS to use the proper class for serialization.

Tom Hubbard