function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
noedskovnoedskov 

Problems generating Apex classes from Axis2 WSDL

Hi,

 

I'm not quite sure if this falls under Apex or Java development but I decided to post it here.

 

I've created a number of Java classes and turned them into a web service using Axis2 1.4.1 and I seem to keep banging my head against the wall when trying to convert that into Apex code.

 

I go to Setup --> Develop --> Apex Classes and press the button "Generate from WSDL".

 

First I got an error message telling me that multiple bindings aren't allowed. So, I manually edit the WSDL removing the Soap11Binding and Soap12Binding, leaving only the HttpBinding.

 

Next, I get an error message that anyType isn't supported by SFDC. Scanning the Help & Training section I see that the "anyType" previously was mapped to "string". So, once again I manually edit my WSDL file and change anyType to string. Not sure if that's the right decision or not as my method returns a rather simple (Java) object with a couple of fields (a boolean and 3 Strings).

 

Now, it seems like all is well and I get to the 3rd and last step of the wizard but wrong again. On the 3rd, and final, step I'm presented with the following error:

 

Apex generation failed.


Error message:

Error: Unable to find soap 1.1 address

 

And that's where I'm at right now. Is there anyone out there who can point me in the right direction? All help and tips is appreciated.

 

I've worked a lot with axis1 but am new to axis2. My service/class is called PublicatorProTrialManager.java and when creating the client files for the WSDL I get PublicatorProTrialManager.java, PublicatorProTrialManagerLocator, PublicatorProTrialManagerPortType, PublicatorProTrialManagerPortTypeProxy, 2 binding stubs (soap 1.1 and soap 1.2) and a CreateTrialCustomerAndUserResponse.java (the method in the service is called createTrialCustomerAndUser and it returns an object called TrialResult.

 

Does that seem correct to you guys? I would have expected to also see Java files for my TrialResponse obect and the exceptions I've created as well. They would have been generated if I were to use axis1 so I'm a bit worried that I might be doing something wrong or missing some configuration.

 

Best regards,

 

Søren Nøskov Hansen

Zmags ApS

Message Edited by noedskov on 05-16-2009 05:48 PM
Message Edited by noedskov on 05-16-2009 05:58 PM
Message Edited by noedskov on 05-17-2009 02:45 AM
indranily81indranily81

Hi noedskov,

 

Could you proceed further as I am stuck in the same error message ?

 

Error: Unable to find soap 1.1 address.

 

Please let me know if you found any solution.

 

Thanks

indranily81

 

Imran MohammedImran Mohammed

Hi,

 

Were you able to find a solution for the anyType in WSDL schema or it should be treated as a string.

Please respond as i am facing the same issue.

 

Regards

 

 

KanouKanou

You should only leaving the Soap11Binding and remove other two binding.