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
DuodouDuodou 

web service call out....same SOAP request..tested fine with soapUI, but returned error on force.com

Can anyone please help me with below web service call out problem?

 

The callout request is blow:

<?xml version="1.0" encoding="UTF-8"?>

 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<env:Header />

<env:Body><m:FopEngine xmlns:m="http://www.centtric.com/schema/FopEngine"><fileName>test</fileName>

</m:FopEngine>

</env:Body>

</env:Envelope>

 

The endpoint is on my local computer...

 

 

I tested the same requestin soapUI, it responses correctly, but doesn't work in force.com. Here is the returned error log:

 

20100125203747.498:Class.centtric.CF_ContractFopengine.FopEnginePort.FopEngine: line 18, column 13:     Created Web Service callout to endpoint: http://localhost:8080/fopengine/services/fopengine


20100125203747.498:Class.centtric.CF_ContractFopengine.FopEnginePort.FopEngine: line 18, column 13:     Sending callout request


20100125203747.498:Class.centtric.CF_ContractFopengine.FopEnginePort.FopEngine: line 18, column 13:     <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><m:FopEngine xmlns:m="http://www.centtric.com/schema/FopEngine"><fileName>test</fileName></m:FopEngine></env:Body></env:Envelope>


20100125203747.498:Class.centtric.CF_ContractFopengine.FopEnginePort.FopEngine: line 18, column 13:     Reading callout response


20100125203747.498:Class.centtric.CF_ContractFopengine.FopEnginePort.FopEngine: line 18, column 13:     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>

 

 

I really really don't understand why same request is ok in soapUI, but not force.com....my external web service is quite simple, didn't use any complex soap type..here is the wsdl:

 

<!--
 Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2-hudson-752-.
-->

<wsdl:definitions name="FopEngine" targetNamespace="http://www.centtric.com/contract/FopEngine">

<wsdl:types>

<xsd:schema targetNamespace="http://www.centtric.com/schema/FopEngine">

<xsd:element name="FopEngine">

<xsd:complexType>

<xsd:sequence>
<xsd:element name="fileName" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="FopEngineResponse">

<xsd:complexType>

<xsd:sequence>
<xsd:element name="returnedUrl" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>

<wsdl:message name="FopEngineRequest">
<wsdl:part element="fe:FopEngine" name="parameters"/>
</wsdl:message>

<wsdl:message name="FopEngineResponse">
<wsdl:part element="fe:FopEngineResponse" name="parameters"/>
</wsdl:message>

<wsdl:portType name="FopEnginePortType">

<wsdl:operation name="FopEngine">
<wsdl:input message="tns:FopEngineRequest"/>
<wsdl:output message="tns:FopEngineResponse"/>
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="FopEngineBinding" type="tns:FopEnginePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="FopEngine">
<soap:operation soapAction=""/>

<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>

<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="FopEngineService">

<wsdl:port name="FopEnginePort" binding="tns:FopEngineBinding">
<soap:address location="http://localhost:8080/fopengine/services/fopengine"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

 

 

 

Any tips, advise are appreciated.

 

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
DuodouDuodou

That is right!!!!...forgot the system is on cloud :-) ...changed to public IP..and it is working now..

 

Thank you for your help!

All Answers

SuperfellSuperfell
The salesforce.com server can't work out that http://localhost:8080/fopengine/services/fopengine is really your desktop machine. You need to use a public IP/name for your service.
DuodouDuodou

That is right!!!!...forgot the system is on cloud :-) ...changed to public IP..and it is working now..

 

Thank you for your help!

This was selected as the best answer