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
chinnarowdychinnarowdy 

SalesFroce-JaxWS webservice communication issue

Hi,


I have deployed my java (jax ws) web service in my local system which in a private network.

I am trying to access this web service through SalesForce. I have generated the necessary stubs.

While Calling the web service I am getting the below error:

 

Error Message:
Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'
Error is in expression '{!callWs}' in component <apex:page> in page test

 

My Apex page code:
=================
<apex:page controller="myController" tabStyle="Account" >
<apex:form >
<apex:pageBlock title="Congratulations {!$User.FirstName}">
{!testVariable}
<apex:commandButton action="{!callWs}" value="Call WS"/>
</apex:pageBlock>
</apex:form>
</apex:page>

 

MyController Code:
=================
public class myController {

String testVariable;

public String getTestVariable() {
return testVariable;
}


public PageReference callWs() {


ProcessService.EnterpriseProcessServicesPort myPort = new ProcessService.EnterpriseProcessServicesPort();
ProcessMessages.StartNyssCaseRequest startNyssCaseRequest = new ProcessMessages.StartNyssCaseRequest();
ProcessMessages.StartNyssCaseReply startNyssCaseReply = new ProcessMessages.StartNyssCaseReply();

startNyssCaseRequest.CableUnitNumber='0000000005';
startNyssCaseRequest.CaseNumber='4000021721';
startNyssCaseRequest.ContactPersonId='21331395--TDC--KTV-';
startNyssCaseRequest.ReactionSale=false;
startNyssCaseRequest.SalesRepresentativeId='KAS.P2---4007184487';
startNyssCaseRequest.CaseTypeId='2028629---TDC--KTV-';

myPort.startNyssCase(startNyssCaseRequest);
return null;
}

}

I have added Remote site settings as below:
==================================
Remote Site Name: EnterpriseProcessServices
Remote Site URL: http://10.74.9.83:7001

 

Please help me, where I am doing wrong?