Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9016611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:02:26+00:00 2026-06-16T04:02:26+00:00

I’m struggling around with some problems calling my Java Webservice. As long as I

  • 0

I’m struggling around with some problems calling my Java Webservice. As long as I use primitive datatypes, such as Strings, Integers etc. everything works fine.

But when I try to use objects as parameters my java methods only receive null. So the mapping doesn’t seem to work. I put up a simple example:

Java Interface for Webservice

@WebService(name="TestService", targetNamespace=CNAPBackOffice.NAMESPACE_SERVICES)
@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
public interface TestService {
    @WebMethod(operationName="sendComplexType")
    @WebResult(name="okString")
    public String sendComplexType(TestData data);
}

Java Implementation

@WebService(endpointInterface = "lu.ciss.backoffice.cnap.services.TestService",
        portName = "TestEndpoint", serviceName = "TestService",
        targetNamespace = CNAPBackOffice.NAMESPACE_SERVICES)
public class TestServiceImpl implements TestService {

    @Override
    public String sendComplexType(TestData data) {
        return data.getTestString();
    }

}

TestData Class

public class TestData {
    String testString;
    ... + Setter/Getter for testString
}

I use the generated WSDL to import it to Delphi using the “Component->Import WSDL…” menu. Afterwards I call the Webservice like this:

procedure TFRM_Test.TestClick(Sender: TObject);
var
Service: TestService;
data: TestData;
result: String;
begin
  Service := GetTestService(true);
  data := TestData.Create;

  data.testString := 'Bla';

  result := Service.sendComplexType(data);

  ShowMessage(result);
end;

Like I said before, the Java side receives null which causes en exception in this case. So obviously the mapping between the two worlds isn’t working correctly. I tried to change different options in the WSDL import menu, but nothing seems to work. I took a look at the SOAP request fired by Delphi:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS2="http://cnap.backoffice.ciss.lu/services">
        <NS1:sendComplexType xmlns:NS1="http://cnap.backoffice.ciss.lu/services">
            <arg0 href="#1"/>
        </NS1:sendComplexType>

        <NS2:testData id="1" xsi:type="NS2:testData">
            <testString xsi:type="xsd:string">Bla</testString>
        </NS2:testData>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I never saw before this strange notion of references. Could this cause the trouble? Or does someone else have another idea or even better: a solution 🙂

Thanks in advance.

P.S. Here is the generated WSDL:

<?xml version="1.0" ?><wsdl:definitions name="TestService" targetNamespace="http://cnap.backoffice.ciss.lu/services" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://cnap.backoffice.ciss.lu/services" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
<xs:schema targetNamespace="http://cnap.backoffice.ciss.lu/services" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="testData">
    <xs:sequence>
      <xs:element minOccurs="0" name="testString" type="xs:string"></xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
  </wsdl:types>
  <wsdl:message name="sendComplexType">
    <wsdl:part name="arg0" type="tns:testData">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="sendComplexTypeResponse">
    <wsdl:part name="okString" type="xsd:string">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="TestService">
    <wsdl:operation name="sendComplexType">
      <wsdl:input message="tns:sendComplexType" name="sendComplexType">
    </wsdl:input>
      <wsdl:output message="tns:sendComplexTypeResponse" name="sendComplexTypeResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="TestServiceSoapBinding" type="tns:TestService">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
    <wsdl:operation name="sendComplexType">
      <soap:operation soapAction="" style="rpc"></soap:operation>
      <wsdl:input name="sendComplexType">
        <soap:body namespace="http://cnap.backoffice.ciss.lu/services" use="literal"></soap:body>
      </wsdl:input>
      <wsdl:output name="sendComplexTypeResponse">
        <soap:body namespace="http://cnap.backoffice.ciss.lu/services" use="literal"></soap:body>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="TestService">
    <wsdl:port binding="tns:TestServiceSoapBinding" name="TestEndpoint">
      <soap:address location="http://localhost:7777/CNAP_BackOffice/services/TestService"></soap:address>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:02:27+00:00Added an answer on June 16, 2026 at 4:02 am

    It’s Delphi’s fault.

    Your JSR-181/JSR-224 annotated interface has explicit @SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL) and your generated WSDL states clearly that it’s RPC/Literal WebService

      <wsdl:binding name="TestServiceSoapBinding" type="tns:TestService">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
        <wsdl:operation name="sendComplexType">
          <soap:operation soapAction="" style="rpc"></soap:operation>
          <wsdl:input name="sendComplexType">
            <soap:body namespace="http://cnap.backoffice.ciss.lu/services" use="literal"></soap:body>
          </wsdl:input>
    

    Delphi however created Soap-Encoded SOAP 1.1 Envelope with MultiRef values and indicated it using SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/".

    So you have to tweak some options in Delphi…

    Maybe Delphi can’t import RPC/Literal? Try switching to Document/Literal/Wrapped:

    @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle = ParameterStyle.WRAPPED)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have been unable to fix a problem with Java Unicode and encoding. The
I need a function that will clean a strings' special characters. I do NOT
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.