Java clients calling Delphi soap services

<div id="jive-html-wrapper-div">
<br />
<DIV><FONT size="2" face="Arial">We have major problems using java clients with <br />
Delphi servers. Problems with wsdls, problems with validating services etc. We <br />
can solve a lot of issues by modifiying the wsdl by hand, but are we unique in <br />
this or are there more problems out there. We are running D2007.</FONT></DIV>
<DIV><FONT size="2" face="Arial"></FONT>&nbsp;</DIV>
<DIV><FONT size="2" face="Arial">albert</FONT></DIV>
</div>
0
Albert
4/26/2010 9:48:45 AM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

6 Replies
1697 Views

Similar Articles

[PageSpeed] 47

Am 26.04.2010 11:48, Albert Drent wrote:
>
> We have major problems using java clients with
> Delphi servers. Problems with wsdls, problems with validating services etc. We
> can solve a lot of issues by modifiying the wsdl by hand, but are we unique in
> this or are there more problems out there. We are running D2007.
> albert

Which Soap framework for Java are you using on the client side (Axis, 
CXF, Metro, JAX-WS, ...)? Maybe you can post an example (WSDL, Java and 
Delphi Soap request)?

Regards,
-- 
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
0
Michael
4/26/2010 4:27:55 PM
Hi Albert,

> We have major problems using java clients with
> Delphi servers. Problems with wsdls, problems with validating services 
> etc. We can solve a lot of issues by modifiying the wsdl by hand, but 
> are we unique in this or are there more problems out there. 

I also have similar problems in several projects connecting to Java 
(Axis) servers - using Delphi 2007 and 2010. Manual modifications of 
SOAP requests (and sometimes responses) is the only way we could solve 
it... Not a lot of fun, but AFAICS the only option...

> albert

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
4/27/2010 7:02:00 AM
Am 27.04.2010 09:02, Bob Swart wrote:

> I also have similar problems in several projects connecting to Java
> (Axis) servers

Ok, but here it seems to be Java Client -> Delphi Server.

Maybe it is an option to create the WSDL in a Java toolkit (Eclipse and 
NetBeans offer support for WSDL design) and use this WSDL then to build 
the Delphi server? - The result should be more compatible with the Java 
side this way.

Cheers,
-- 
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
0
Michael
4/27/2010 7:13:28 AM
Hi Michael,

> Ok, but here it seems to be Java Client -> Delphi Server.

Ah, I stand corrected. I must admit I'm seldom found in that situation. 
When we need to make Delphi clients for web services, we're often "left 
by ourselves" to solve any interoperability issues, and I've never been 
contacted about interoperability issues between a Delphi server and Java 
or .NET clients (well, apart from the soRootRefNodesToBody option for 
..NET clients, but we figured that one out by ourselves ;-)).

> Maybe it is an option to create the WSDL in a Java toolkit (Eclipse and 
> NetBeans offer support for WSDL design) and use this WSDL then to build 
> the Delphi server? - The result should be more compatible with the Java 
> side this way.

Hmm, could be. I'm not sure if the resulting WSDL would be 100% 
compatible, and if .NET clients would like it, but it surely is an idea 
to pursuit!

> Cheers,

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
4/27/2010 7:18:16 AM
We are using the JAX-RPC import. I've attached the wsdl. In 2001 we created 
an applicationserver in Delphi which is used to impement a webapplication 
for self-service on our salary system. People can buy/sell hollidays for 
money etc. After they have chosen something a salary specification is shown 
to specifiy the consequences of their choice.

Now in the soa-age the university likes to have the functions available as a 
webservice. Since all is there in the application server I modified it to 
reply to ordinary http(s) requests and soap envelopes. The latter is 
transfered to the pascalinvoker and the anser is given as xml, the regular 
messages are treated as the standard http request and reply with an html 
message. It works well, but unfortunately there are some difficult wsdl/soap 
issues.

As middleware Oracle fusion is used which is java (with bpel engine). But we 
also use .Net. The power of services is that it can be used by all kind of 
clients? Well unfortunately it's not that simple.

With Java the reported error is generated.
With .Net we get:

albert




  <?xml version="1.0" encoding="utf-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IPerSalSoaservice" 
targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
xmlns:ns1="urn:PerSalIntf">
- <types>
- <xs:schema targetNamespace="urn:PerSalIntf" xmlns="urn:PerSalIntf">
- <xs:complexType name="TSalarisSlip">
- <xs:sequence>
  <xs:element name="SalDetailRegels" type="ns1:TSalDetailRegels" />
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="TSalDetailRegels">
- <xs:complexContent>
- <xs:restriction base="soapenc:Array">
  <xs:sequence />
  <xs:attribute ref="soapenc:arrayType" n1:arrayType="xs:string[]" 
xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
  </xs:restriction>
  </xs:complexContent>
  </xs:complexType>
- <xs:complexType name="TAuthorisation">
- <xs:sequence>
  <xs:element name="context" type="xs:string" />
  <xs:element name="contextId" type="xs:string" />
  <xs:element name="contextPsw" type="xs:string" />
  <xs:element name="RegNr" type="xs:string" />
  <xs:element name="IArNr" type="xs:string" />
  <xs:element name="RegPwd" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="EPerSoaFault">
- <xs:sequence>
  <xs:element name="Reason" type="xs:string" />
  <xs:element name="FaultActor" type="xs:string" />
  <xs:element name="FaultCode" type="xs:string" />
  <xs:element name="FaultDetail" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  </xs:schema>
  </types>
- <message name="SalarisSlip0Request">
  <part name="Jaar" type="xs:int" />
  <part name="Maand" type="xs:int" />
  </message>
- <message name="SalarisSlip0Response">
  <part name="return" type="ns1:TSalarisSlip" />
  </message>
- <message name="SalarisSlip0headerRequest">
  <part name="TAuthorisation" type="ns1:TAuthorisation" />
  </message>
- <message name="SalarisSlip0headerResponse">
  <part name="TAuthorisation" type="ns1:TAuthorisation" />
  </message>
- <message name="SalarisSlip0fault0">
  <part name="EPerSoaFault" type="ns1:EPerSoaFault" />
  </message>
- <message name="LaatsteVerwerkingsDatum1Request">
  <part name="dummy" type="xs:string" />
  </message>
- <message name="LaatsteVerwerkingsDatum1Response">
  <part name="return" type="xs:date" />
  </message>
- <message name="LaatsteVerwerkingsDatum1headerRequest">
  <part name="TAuthorisation" type="ns1:TAuthorisation" />
  </message>
- <message name="LaatsteVerwerkingsDatum1headerResponse">
  <part name="TAuthorisation" type="ns1:TAuthorisation" />
  </message>
- <message name="LaatsteVerwerkingsDatum1fault0">
  <part name="EPerSoaFault" type="ns1:EPerSoaFault" />
  </message>
- <portType name="IPerSalSoa">
- <operation name="SalarisSlip">
  <input message="tns:SalarisSlip0Request" />
  <output message="tns:SalarisSlip0Response" />
  <fault name="EPerSoaFault" message="tns:SalarisSlip0fault0" />
  </operation>
- <operation name="LaatsteVerwerkingsDatum">
  <input message="tns:LaatsteVerwerkingsDatum1Request" />
  <output message="tns:LaatsteVerwerkingsDatum1Response" />
  <fault name="EPerSoaFault" message="tns:LaatsteVerwerkingsDatum1fault0" />
  </operation>
  </portType>
- <binding name="IPerSalSoabinding" type="tns:IPerSalSoa">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" 
/>
- <operation name="SalarisSlip">
  <soap:operation soapAction="urn:PerSalIntf-IPerSalSoa#SalarisSlip" 
style="rpc" />
- <input>
  <soap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf-IPerSalSoa" />
  <soap:header use="encoded" message="tns:SalarisSlip0headerRequest" 
part="TAuthorisation" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf" />
  </input>
- <output>
  <soap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf-IPerSalSoa" />
  <soap:header use="encoded" message="tns:SalarisSlip0headerResponse" 
part="TAuthorisation" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf" />
  </output>
- <fault name="EPerSoaFault">
  <soap:fault name="EPerSoaFault" use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf-IPerSalSoa" />
  </fault>
  </operation>
- <operation name="LaatsteVerwerkingsDatum">
  <soap:operation 
soapAction="urn:PerSalIntf-IPerSalSoa#LaatsteVerwerkingsDatum" style="rpc" 
/>
- <input>
  <soap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf-IPerSalSoa" />
  <soap:header use="encoded" 
message="tns:LaatsteVerwerkingsDatum1headerRequest" part="TAuthorisation" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf" />
  </input>
- <output>
  <soap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf-IPerSalSoa" />
  <soap:header use="encoded" 
message="tns:LaatsteVerwerkingsDatum1headerResponse" part="TAuthorisation" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf" />
  </output>
- <fault name="EPerSoaFault">
  <soap:fault name="EPerSoaFault" use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:PerSalIntf-IPerSalSoa" />
  </fault>
  </operation>
  </binding>
- <service name="IPerSalSoaservice">
- <port name="IPerSalSoaPort" binding="tns:IPerSalSoabinding">
  <soap:address 
location="http://localhost/cgi-bin/gateway.exe/soap/IPerSalSoa" />
  </port>
  </service>
  </definitions>


"Bob Swart" <Bob@eBob42.com> wrote in message 
news:237694@forums.embarcadero.com...
> Hi Michael,
>
>> Ok, but here it seems to be Java Client -> Delphi Server.
>
> Ah, I stand corrected. I must admit I'm seldom found in that situation.
> When we need to make Delphi clients for web services, we're often "left
> by ourselves" to solve any interoperability issues, and I've never been
> contacted about interoperability issues between a Delphi server and Java
> or .NET clients (well, apart from the soRootRefNodesToBody option for
> .NET clients, but we figured that one out by ourselves ;-)).
>
>> Maybe it is an option to create the WSDL in a Java toolkit (Eclipse and
>> NetBeans offer support for WSDL design) and use this WSDL then to build
>> the Delphi server? - The result should be more compatible with the Java
>> side this way.
>
> Hmm, could be. I'm not sure if the resulting WSDL would be 100%
> compatible, and if .NET clients would like it, but it surely is an idea
> to pursuit!
>
>> Cheers,
>
> Groetjes,
>           Bob Swart
>
> -- 
> Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
> Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
> Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
> http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
> Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
> Personal courseware + e-mail support http://www.ebob42.com/courseware
> Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Albert
4/27/2010 9:46:53 AM
Sorry, hit a wrong button so the previous message is not complete

With .Net we get

There was an error downloading
'http://xxx.xxx.xxx.xxx/cgi-bin/gateway/wsdl/IPerSalSoa?wsdl'.
The server committed a protocol violation. Section=ResponseHeader
Detail=CR must be followed by LF
There was an error downloading
'http://xxx.xxx.xxx.xxx/gateway/wsdl/IPerSalSoa?wsdl/$meta

albert
0
Albert
4/27/2010 9:48:45 AM
Reply: