Skip to Content

Java web service deployed OK but WSDL missing definition

Jun 15, 2017 at 04:02 PM


avatar image


NWDS 7.5 and NW Java 7.5

NWDS: simple java module + 2 extra class definitions
The module has 2 methods each returning an array, each array is based upon an object defined in a separate class. (similar definition: each object has 2 string attributes)
The web service gets deployed successfully.

NW Java: When looking at the WSDL I notice that 1 response definition is not complete.

One response definition refers to a type definition, but the complex type definition contains only an empty sequence. ( <xs:sequence /> )

The other response definition refers to a type definition and here the complex type contains the elements (the string attributes of the object upon which it is based).

The deployment is OK - no error reported.
The class definitions are similar - I see no difference.
Yet the WSDL of the deployed web service only contains 1 complete response definition instead of 2.

It can be a simple oversight but I don't seem to find it.
Does somebody have tips on what to look for ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Sammy Van Noten Jun 29, 2017 at 07:32 AM

Just a combination of being new to this and not using the expected naming conventions.

The extra classes have been updated with the appropriate set en get methods and now the provided WSDL does contain the expected elements.

10 |10000 characters needed characters left characters exceeded
Sammy Van Noten Jun 20, 2017 at 05:06 PM

No manual annotations made – tried to use the wizards and menu’s of NWDS all the time.
NWDS – right-click service class – Web service – Create Web service
Have the system create the web service and it was deployed automatically.

Main service class (NWDS – add new – Session Bean (EJB 3.x) )

@SrPublication(location = "/com/pxm/cryptoAlgorithmBean.classifications")@WebService(endpointInterface = "com.pxm.cryptoAlgorithmBeanSEI_01", portName = "cryptoAlgorithmBeanPort", serviceName = "cryptoAlgorithmBeanService", targetNamespace = "")@Stateless@DeclareRoles(value = { "SPOMS_algo" })

public class cryptoAlgorithmBean implements cryptoAlgorithmBeanRemote, cryptoAlgorithmBeanSEI_01 {
  public MyAlgoObj[] GetAlgorithmList(String notUsed)  {
   MyAlgoObj[] algoList = new MyAlgoObj[2];
      algoList[0] = new MyAlgoObj("3DES", "Tripple DES - deprecated");
      algoList[1] = new MyAlgoObj("AES128", "Advanced Encryption Standard - 128 key size");
     return algoList;
 public EncryptKIObject[] Encrypt_KI(String[] encrKi, String encrDEK1, String encrK4, String encrAlgo1, String encrAlgo4) {
  String responseS = null;
  EncryptKIObject[] encryptKIObjects = new EncryptKIObject[encrKi.length];
  return encryptKIObjects;

Class MyAlgoObj (NWDS – add new - class)

public class MyAlgoObj implements Serializable {
   String algoID = null;
   String algoText = null;

Class EncryptKIObject (NWDS – add new - class)

public class EncryptKIObject implements Serializable {
 String originalValue = null;
 String newValue = null;

Interface defined by NWDS wizard

@WebService(name = "cryptoAlgorithmBean", targetNamespace = "")public interface cryptoAlgorithmBeanSEI_01 {
 @WebMethod(operationName = "GetAlgorithmList") public MyAlgoObj[] GetAlgorithmList(@WebParam(name = "notUsed") String notUsed);
 @WebMethod(operationName = "Encrypt_KI") public EncryptKIObject[] Encrypt_KI(@WebParam(name = "encrKi") String[] encrKi, @WebParam(name = "encrDEK1") String encrDEK1, @WebParam(name = "encrK4") String encrK4, @WebParam(name = "encrAlgo1") String encrAlgo1, @WebParam(name = "encrAlgo4") String encrAlgo4);}

WSDL found on server - the complex type myAlgoObj has an empty sequence.

<xs:element name="Encrypt_KI" type="tns:Encrypt_KI" />
<xs:element name="Encrypt_KIResponse" type="tns:Encrypt_KIResponse" />
<xs:element name="GetAlgorithmList" type="tns:GetAlgorithmList" />
<xs:element name="GetAlgorithmListResponse" type="tns:GetAlgorithmListResponse" /> 
<xs:complexType name="GetAlgorithmList">
	<xs:sequence><xs:element minOccurs="0" name="notUsed" type="xs:string" /> </xs:sequence></xs:complexType>
<xs:complexType name="GetAlgorithmListResponse">
	<xs:sequence><xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:myAlgoObj" />
<xs:complexType name="myAlgoObj"><xs:sequence /> </xs:complexType>

<xs:complexType name="Encrypt_KI">
		<xs:element maxOccurs="unbounded" minOccurs="0" name="encrKi" type="xs:string" />
		<xs:element minOccurs="0" name="encrDEK1" type="xs:string" />
		<xs:element minOccurs="0" name="encrK4" type="xs:string" />
		<xs:element minOccurs="0" name="encrAlgo1" type="xs:string" />
		<xs:element minOccurs="0" name="encrAlgo4" type="xs:string" />
<xs:complexType name="Encrypt_KIResponse">
		<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:encryptKIObject" />
<xs:complexType name="encryptKIObject">
		<xs:element minOccurs="0" name="newValue" type="xs:string" />
		<xs:element minOccurs="0" name="originalValue" type="xs:string" />
10 |10000 characters needed characters left characters exceeded
Tobias Hamdorf Jun 16, 2017 at 12:31 PM

Without seeing any of your files of the project / implementation, no one will be able to help you. Also how did you create your service? Have you created an ejb and annotated all by yourself? Have you used NWDS wizzards to generate stuff?


10 |10000 characters needed characters left characters exceeded