Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found the solution. When you are creating the WebService with Java EE you have to add all namespaces, otherwise you will get the errors above.<br> After fixing the <em>FaultException</em>, I got a <em>NullReferenceException</em>, which indicates that I have to fix the response handling, too.</p> <p>Thanks a lot to <strong>@calum</strong>.</p> <p>Here is a sample implementation of the WebService, which works together with Axis2 and the SLsvcUtil tool:</p> <pre><code>package com.test; //imports here @WebService(targetNamespace = "com.test") public class BBAppWebAccess { @WebMethod @WebResult(targetNamespace="com.test.poi") public POI getPOI( @WebParam(name="ID", targetNamespace="com.test.poi") int id) { return new POI(id); } } </code></pre> <p>The new message looks like following:</p> <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;getPOI xmlns="com.test"&gt; &lt;ID xmlns="com.test.poi"&gt;1&lt;/ID&gt; &lt;/getPOI&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre> <p>The new genereated <em>getPOI</em> class:</p> <pre><code>[System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="getPOI", WrapperNamespace="com.test", IsWrapped=true)] public partial class getPOI { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="com.test.poi", Order=0)] public int ID; public getPOI() { } public getPOI(int ID) { this.ID = ID; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload