Link to home
Start Free TrialLog in
Avatar of pclarke7
pclarke7

asked on

URL access to web service fails but access via Client is ok.

I have a C# WCF Service which is hosted in IIS 8.5 and has a number of web services. One of these web services is called MobileRegistration and when called from the Client works correctly (see below)

using (var svc = new DCRulesServiceRef1.TransactionClient())
{string returnval = svc.MobileRegistration(enterpriseId, userId, deviceId, qrcode);}

Open in new window


However I also need to be able to call the webservice MobileRegistration directly via a URL without having to go through the client. The URL I created is as follows

http://xx.xx.xx.xxx/DCRules2Alias/Service.svc/MobileRegistration/?&userId=TESTUSER&enterpriseId=TESTENTERPRISE&deviceId=TESTDEVICE&qrcode=TESTQRCODE
This fails with HTTP400 Webpage cannot be found.

http://xx.xx.xx.xxx/DCRules2Alias/Service.svc  does return the TransactonService Service page successfully.  So why can it not find my service. Is the format of the URL incorrect for a WCF web service ? Below is some of the relevant code and WSDL. Appreciate if someone can point out what I am doing wrong

regards
Pat

Operation Contract for MobileRegistration web service
[OperationContract]
[WebGet(UriTemplate = "MobileRegistration?enterpriseId={enterpriseId}&userId={userId}&deviceId={devicerId}&qrcode={qrcode")]

        string MobileRegistration(string enterpriseId, string userId, string deviceId, string qrcode);

Open in new window


Web.config file
   <!-- Required to prevent error when updating Service reference -->
    <httpModules>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Extensibility.Web.ApplicationInsightsHttpModule, Microsoft.ApplicationInsights.Extensibility.Web" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
    </httpModules>
    <httpRuntime maxRequestLength="2147483647" />
    <compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
    </compilation>
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
      </providers>
    </roleManager>
  </system.web>


  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="ApplicationInsightsWebTracking" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    <staticContent>
      <remove fileExtension=".label" />
      <mimeMap fileExtension=".label" mimeType="application/DYMO Label Software" />
    </staticContent>
  </system.webServer>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <client>
      <endpoint address="http://dev/DCRules2Alias/Service.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITransaction" contract="DCRulesServiceRef1.ITransaction" name="WSHttpBinding_ITransaction">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" />
    <services>
      <service name="DCRules2.TransactionService">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/DCRules2/PassedParms/" />
          </baseAddresses>
        </host>
        <!-- Service Endpoints -->
        <!-- Unless fully qualified, address is relative to base address supplied above -->
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_ITransaction" contract="DCRules2.ITransaction">
          <!-- 
              Upon deployment, the following identity element should be removed or replaced to reflect the 
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
              automatically.
          -->
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <!-- Metadata Endpoints -->
        <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
        <!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </serviceBehaviors>

      <!-- New -->
      <endpointBehaviors>
        <behavior name="WebBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <!-- endNew -->


    </behaviors>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpBinding_ITransaction" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <reliableSession enabled="true" />
          <security mode="None" />
        </binding>
        <binding name="WSHttpBinding_ITransaction">
          <reliableSession enabled="true" />
          <security mode="None" />
        </binding>
      </wsHttpBinding>
    </bindings>
  </system.serviceModel>

Open in new window


WSDL
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/" name="TransactionService"><wsp:Policy wsu:Id="WSHttpBinding_ITransaction_policy"><wsp:ExactlyOne><wsp:All><wsrm:RMAssertion xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"><wsrm:InactivityTimeout Milliseconds="600000"/><wsrm:AcknowledgementInterval Milliseconds="200"/></wsrm:RMAssertion><wsaw:UsingAddressing/></wsp:All></wsp:ExactlyOne></wsp:Policy><wsdl:types><xs:schema targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:import namespace="http://schemas.datacontract.org/2004/07/DCRules2"/><xs:element name="Login"><xs:complexType><xs:sequence><xs:element name="userId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userPassword" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="LoginResponse"><xs:complexType><xs:sequence><xs:element name="LoginResult" type="q1:RtnFromServiceParms" nillable="true" minOccurs="0" xmlns:q1="http://schemas.datacontract.org/2004/07/DCRules2"/></xs:sequence></xs:complexType></xs:element><xs:element name="NextTransactionSeq"><xs:complexType><xs:sequence><xs:element name="MyPassToServiceParms" type="q2:PassToServiceParms" nillable="true" minOccurs="0" xmlns:q2="http://schemas.datacontract.org/2004/07/DCRules2"/></xs:sequence></xs:complexType></xs:element><xs:element name="NextTransactionSeqResponse"><xs:complexType><xs:sequence><xs:element name="NextTransactionSeqResult" type="q3:RtnFromServiceParms" nillable="true" minOccurs="0" xmlns:q3="http://schemas.datacontract.org/2004/07/DCRules2"/></xs:sequence></xs:complexType></xs:element><xs:element name="Register"><xs:complexType><xs:sequence><xs:element name="userEmailAddr" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userEnterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userPassword" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="inviteKey" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="RegisterResponse"><xs:complexType><xs:sequence><xs:element name="RegisterResult" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="ForgotMyPassword"><xs:complexType><xs:sequence><xs:element name="userId" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="ForgotMyPasswordResponse"><xs:complexType><xs:sequence><xs:element name="ForgotMyPasswordResult" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="ResponseToInvitationToJoin"><xs:complexType><xs:sequence><xs:element name="emailAddress" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="enterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="inviteKey" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="action" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="ResponseToInvitationToJoinResponse"><xs:complexType><xs:sequence><xs:element name="ResponseToInvitationToJoinResult" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="MobileRegistration"><xs:complexType><xs:sequence><xs:element name="enterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="deviceId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="qrcode" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="MobileRegistrationResponse"><xs:complexType><xs:sequence><xs:element name="MobileRegistrationResult" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="ScannedTransactions"><xs:complexType><xs:sequence><xs:element name="enterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="deviceId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="barcodevalue" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element><xs:element name="ScannedTransactionsResponse"><xs:complexType><xs:sequence><xs:element name="ScannedTransactionsResult" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:schema><xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"><xs:element name="anyType" type="xs:anyType" nillable="true"/><xs:element name="anyURI" type="xs:anyURI" nillable="true"/><xs:element name="base64Binary" type="xs:base64Binary" nillable="true"/><xs:element name="boolean" type="xs:boolean" nillable="true"/><xs:element name="byte" type="xs:byte" nillable="true"/><xs:element name="dateTime" type="xs:dateTime" nillable="true"/><xs:element name="decimal" type="xs:decimal" nillable="true"/><xs:element name="double" type="xs:double" nillable="true"/><xs:element name="float" type="xs:float" nillable="true"/><xs:element name="int" type="xs:int" nillable="true"/><xs:element name="long" type="xs:long" nillable="true"/><xs:element name="QName" type="xs:QName" nillable="true"/><xs:element name="short" type="xs:short" nillable="true"/><xs:element name="string" type="xs:string" nillable="true"/><xs:element name="unsignedByte" type="xs:unsignedByte" nillable="true"/><xs:element name="unsignedInt" type="xs:unsignedInt" nillable="true"/><xs:element name="unsignedLong" type="xs:unsignedLong" nillable="true"/><xs:element name="unsignedShort" type="xs:unsignedShort" nillable="true"/><xs:element name="char" type="tns:char" nillable="true"/><xs:simpleType name="char"><xs:restriction base="xs:int"/></xs:simpleType><xs:element name="duration" type="tns:duration" nillable="true"/><xs:simpleType name="duration"><xs:restriction base="xs:duration"><xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/><xs:minInclusive value="-P10675199DT2H48M5.4775808S"/><xs:maxInclusive value="P10675199DT2H48M5.4775807S"/></xs:restriction></xs:simpleType><xs:element name="guid" type="tns:guid" nillable="true"/><xs:simpleType name="guid"><xs:restriction base="xs:string"><xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/></xs:restriction></xs:simpleType><xs:attribute name="FactoryType" type="xs:QName"/><xs:attribute name="Id" type="xs:ID"/><xs:attribute name="Ref" type="xs:IDREF"/></xs:schema><xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DCRules2" targetNamespace="http://schemas.datacontract.org/2004/07/DCRules2" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/><xs:complexType name="RtnFromServiceParms"><xs:sequence><xs:element name="MyDispSeqList" type="tns:ArrayOfDisplaySeq" nillable="true" minOccurs="0"/><xs:element name="MyErrorsEncountered" type="tns:ErrorsEncountered" nillable="true" minOccurs="0"/><xs:element name="MyErrorsEncounteredList" type="tns:ArrayOfErrorsEncountered" nillable="true" minOccurs="0"/><xs:element name="MyInpFldValList" type="tns:ArrayOfInputValues" nillable="true" minOccurs="0"/><xs:element name="MyPrevSelDict" type="q1:ArrayOfKeyValueOfstringArrayOfintty7Ep6D1" nillable="true" minOccurs="0" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/><xs:element name="MySessionLvlValues" type="tns:SessionLvlValues" nillable="true" minOccurs="0"/><xs:element name="MyVarValuesDict" type="q2:ArrayOfKeyValueOfstringstring" nillable="true" minOccurs="0" xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/><xs:element name="passedBadgeId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedBarcodePrefix" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedBarcodeSetting" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedBarcodeSuffix" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedBiometricConfirmationSetting" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedBiometricLoginSetting" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedClientKeywords" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedCurSeq" type="xs:int" minOccurs="0"/><xs:element name="passedCurrentTransDesc" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedCurrentTransId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedCurrentTransType" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedDs1XmlString" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedDs2XmlString" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnterpriseLogo" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnterpriseSkin" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnv" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnvColour" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnvDesc" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedFromFileLoc" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedFromFileName" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedFromFileType" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedInpFldDec" type="xs:int" minOccurs="0"/><xs:element name="passedInpFldLen" type="xs:int" minOccurs="0"/><xs:element name="passedInpFldNam" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedInpFldTxt" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedInpFldTyp" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedInpFldVal" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedPromptDescription" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedPromptId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedSecLvl" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedToFileAction" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedToFileLoc" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedToFileName" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedUserCompanyName" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedUserId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedUserInputMode" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedUserName" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType><xs:element name="RtnFromServiceParms" type="tns:RtnFromServiceParms" nillable="true"/><xs:complexType name="ArrayOfDisplaySeq"><xs:sequence><xs:element name="DisplaySeq" type="tns:DisplaySeq" nillable="true" minOccurs="0" maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:element name="ArrayOfDisplaySeq" type="tns:ArrayOfDisplaySeq" nillable="true"/><xs:complexType name="DisplaySeq"><xs:sequence><xs:element name="dispFldName" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="dispIdx" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="dispKeyWord" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="dispTxt1" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="dispTxt2" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="dispTxt3" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="enterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="secLvl" type="xs:int" minOccurs="0"/><xs:element name="seqNo" type="xs:int" minOccurs="0"/><xs:element name="transId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="transIdx" type="xs:int" minOccurs="0"/><xs:element name="transToCall" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="type" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType><xs:element name="DisplaySeq" type="tns:DisplaySeq" nillable="true"/><xs:complexType name="ErrorsEncountered"><xs:sequence><xs:element name="catchNo" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="enterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="errMsgId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="errorData" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="errorDescr" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="seq" type="xs:int" minOccurs="0"/><xs:element name="sourceMethod" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="transactionId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="userId" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType><xs:element name="ErrorsEncountered" type="tns:ErrorsEncountered" nillable="true"/><xs:complexType name="ArrayOfErrorsEncountered"><xs:sequence><xs:element name="ErrorsEncountered" type="tns:ErrorsEncountered" nillable="true" minOccurs="0" maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:element name="ArrayOfErrorsEncountered" type="tns:ArrayOfErrorsEncountered" nillable="true"/><xs:complexType name="ArrayOfInputValues"><xs:sequence><xs:element name="InputValues" type="tns:InputValues" nillable="true" minOccurs="0" maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:element name="ArrayOfInputValues" type="tns:ArrayOfInputValues" nillable="true"/><xs:complexType name="InputValues"><xs:sequence><xs:element name="description1" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="description2" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="mandatory" type="xs:boolean" minOccurs="0"/><xs:element name="value" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType><xs:element name="InputValues" type="tns:InputValues" nillable="true"/><xs:complexType name="SessionLvlValues"><xs:sequence><xs:element name="GVColRowOveridesExistForTrans" type="xs:boolean" minOccurs="0"/><xs:element name="dispErrorsInWindow" type="xs:boolean" minOccurs="0"/><xs:element name="dispIsEmpty" type="xs:boolean" minOccurs="0"/><xs:element name="dispVarRqd" type="xs:boolean" minOccurs="0"/><xs:element name="displayList" type="xs:boolean" minOccurs="0"/><xs:element name="displayVariables" type="xs:boolean" minOccurs="0"/><xs:element name="dropDownValuesExist" type="xs:boolean" minOccurs="0"/><xs:element name="dspFileUploadCtl" type="xs:boolean" minOccurs="0"/><xs:element name="errorExists" type="xs:boolean" minOccurs="0"/><xs:element name="numberTransProcessed" type="xs:int" minOccurs="0"/><xs:element name="promptExists" type="xs:boolean" minOccurs="0"/><xs:element name="thisTransName" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="whatAmI" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType><xs:element name="SessionLvlValues" type="tns:SessionLvlValues" nillable="true"/><xs:complexType name="PassToServiceParms"><xs:sequence><xs:element name="MyDispSeqList" type="tns:ArrayOfDisplaySeq" nillable="true" minOccurs="0"/><xs:element name="MyErrorsEncounteredList" type="tns:ArrayOfErrorsEncountered" nillable="true" minOccurs="0"/><xs:element name="MyPrevSelDict" type="q3:ArrayOfKeyValueOfstringArrayOfintty7Ep6D1" nillable="true" minOccurs="0" xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/><xs:element name="passedBarcodeScannedInput" type="xs:boolean" minOccurs="0"/><xs:element name="passedBiometricConfirmationSuccessful" type="xs:boolean" minOccurs="0"/><xs:element name="passedBiometricLoginSuccessful" type="xs:boolean" minOccurs="0"/><xs:element name="passedBiometricsRegistered" type="xs:boolean" minOccurs="0"/><xs:element name="passedCurSeq" type="xs:int" minOccurs="0"/><xs:element name="passedCurrentTransId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedDs3XmlString" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedEnterpriseId" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedForwardDirection" type="xs:boolean" minOccurs="0"/><xs:element name="passedInpVal" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedLastUploadedFilePath" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedLocalIPAddress" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedLoggedOnWithMobileDevice" type="xs:boolean" minOccurs="0"/><xs:element name="passedPwd" type="xs:string" nillable="true" minOccurs="0"/><xs:element name="passedRetainPrevErrors" type="xs:boolean" minOccurs="0"/><xs:element name="passedScannerRegistered" type="xs:boolean" minOccurs="0"/><xs:element name="passedUserId" type="xs:string" nillable="true" minOccurs="0"/></xs:sequence></xs:complexType><xs:element name="PassToServiceParms" type="tns:PassToServiceParms" nillable="true"/></xs:schema><xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:complexType name="ArrayOfKeyValueOfstringArrayOfintty7Ep6D1"><xs:annotation><xs:appinfo><IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary></xs:appinfo></xs:annotation><xs:sequence><xs:element name="KeyValueOfstringArrayOfintty7Ep6D1" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:sequence><xs:element name="Key" type="xs:string" nillable="true"/><xs:element name="Value" type="tns:ArrayOfint" nillable="true"/></xs:sequence></xs:complexType></xs:element></xs:sequence></xs:complexType><xs:element name="ArrayOfKeyValueOfstringArrayOfintty7Ep6D1" type="tns:ArrayOfKeyValueOfstringArrayOfintty7Ep6D1" nillable="true"/><xs:complexType name="ArrayOfint"><xs:sequence><xs:element name="int" type="xs:int" minOccurs="0" maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:element name="ArrayOfint" type="tns:ArrayOfint" nillable="true"/><xs:complexType name="ArrayOfKeyValueOfstringstring"><xs:annotation><xs:appinfo><IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary></xs:appinfo></xs:annotation><xs:sequence><xs:element name="KeyValueOfstringstring" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:sequence><xs:element name="Key" type="xs:string" nillable="true"/><xs:element name="Value" type="xs:string" nillable="true"/></xs:sequence></xs:complexType></xs:element></xs:sequence></xs:complexType><xs:element name="ArrayOfKeyValueOfstringstring" type="tns:ArrayOfKeyValueOfstringstring" nillable="true"/></xs:schema></wsdl:types><wsdl:message name="ITransaction_Login_InputMessage"><wsdl:part name="parameters" element="tns:Login"/></wsdl:message><wsdl:message name="ITransaction_Login_OutputMessage"><wsdl:part name="parameters" element="tns:LoginResponse"/></wsdl:message><wsdl:message name="ITransaction_NextTransactionSeq_InputMessage"><wsdl:part name="parameters" element="tns:NextTransactionSeq"/></wsdl:message><wsdl:message name="ITransaction_NextTransactionSeq_OutputMessage"><wsdl:part name="parameters" element="tns:NextTransactionSeqResponse"/></wsdl:message><wsdl:message name="ITransaction_Register_InputMessage"><wsdl:part name="parameters" element="tns:Register"/></wsdl:message><wsdl:message name="ITransaction_Register_OutputMessage"><wsdl:part name="parameters" element="tns:RegisterResponse"/></wsdl:message><wsdl:message name="ITransaction_ForgotMyPassword_InputMessage"><wsdl:part name="parameters" element="tns:ForgotMyPassword"/></wsdl:message><wsdl:message name="ITransaction_ForgotMyPassword_OutputMessage"><wsdl:part name="parameters" element="tns:ForgotMyPasswordResponse"/></wsdl:message><wsdl:message name="ITransaction_ResponseToInvitationToJoin_InputMessage"><wsdl:part name="parameters" element="tns:ResponseToInvitationToJoin"/></wsdl:message><wsdl:message name="ITransaction_ResponseToInvitationToJoin_OutputMessage"><wsdl:part name="parameters" element="tns:ResponseToInvitationToJoinResponse"/></wsdl:message><wsdl:message name="ITransaction_MobileRegistration_InputMessage"><wsdl:part name="parameters" element="tns:MobileRegistration"/></wsdl:message><wsdl:message name="ITransaction_MobileRegistration_OutputMessage"><wsdl:part name="parameters" element="tns:MobileRegistrationResponse"/></wsdl:message><wsdl:message name="ITransaction_ScannedTransactions_InputMessage"><wsdl:part name="parameters" element="tns:ScannedTransactions"/></wsdl:message><wsdl:message name="ITransaction_ScannedTransactions_OutputMessage"><wsdl:part name="parameters" element="tns:ScannedTransactionsResponse"/></wsdl:message><wsdl:portType name="ITransaction" msc:usingSession="true"><wsdl:operation name="Login" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_Login_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/Login"/><wsdl:output message="tns:ITransaction_Login_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/LoginResponse"/></wsdl:operation><wsdl:operation name="NextTransactionSeq" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_NextTransactionSeq_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/NextTransactionSeq"/><wsdl:output message="tns:ITransaction_NextTransactionSeq_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/NextTransactionSeqResponse"/></wsdl:operation><wsdl:operation name="Register" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_Register_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/Register"/><wsdl:output message="tns:ITransaction_Register_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/RegisterResponse"/></wsdl:operation><wsdl:operation name="ForgotMyPassword" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_ForgotMyPassword_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/ForgotMyPassword"/><wsdl:output message="tns:ITransaction_ForgotMyPassword_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/ForgotMyPasswordResponse"/></wsdl:operation><wsdl:operation name="ResponseToInvitationToJoin" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_ResponseToInvitationToJoin_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/ResponseToInvitationToJoin"/><wsdl:output message="tns:ITransaction_ResponseToInvitationToJoin_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/ResponseToInvitationToJoinResponse"/></wsdl:operation><wsdl:operation name="MobileRegistration" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_MobileRegistration_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/MobileRegistration"/><wsdl:output message="tns:ITransaction_MobileRegistration_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/MobileRegistrationResponse"/></wsdl:operation><wsdl:operation name="ScannedTransactions" msc:isTerminating="false" msc:isInitiating="true"><wsdl:input message="tns:ITransaction_ScannedTransactions_InputMessage" wsaw:Action="http://tempuri.org/ITransaction/ScannedTransactions"/><wsdl:output message="tns:ITransaction_ScannedTransactions_OutputMessage" wsaw:Action="http://tempuri.org/ITransaction/ScannedTransactionsResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="WSHttpBinding_ITransaction" type="tns:ITransaction"><wsp:PolicyReference URI="#WSHttpBinding_ITransaction_policy"/><soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="Login"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/Login"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="NextTransactionSeq"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/NextTransactionSeq"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="Register"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/Register"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ForgotMyPassword"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/ForgotMyPassword"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ResponseToInvitationToJoin"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/ResponseToInvitationToJoin"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="MobileRegistration"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/MobileRegistration"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="ScannedTransactions"><soap12:operation style="document" soapAction="http://tempuri.org/ITransaction/ScannedTransactions"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="TransactionService"><wsdl:port name="WSHttpBinding_ITransaction" binding="tns:WSHttpBinding_ITransaction"><soap12:address location="http://localhost:5797/Service.svc"/><wsa10:EndpointReference><wsa10:Address>http://localhost:5797/Service.svc</wsa10:Address><Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"><Dns>localhost</Dns></Identity></wsa10:EndpointReference></wsdl:port></wsdl:service></wsdl:definitions>

Open in new window

Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

are you able to access to the endpoint help page? enable it so that you know what to be passed to your WCF Service.

check the web config setting described in article below.

WCF Web HTTP Service Help Page
https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/wcf-web-http-service-help-page

and what if you try this?

http://xx.xx.xx.xxx/DCRules2Alias/Service.svc/MobileRegistration?userId=TESTUSER&enterpriseId=TESTENTERPRISE&deviceId=TESTDEVICE&qrcode=TESTQRCODE

Open in new window

Avatar of pclarke7
pclarke7

ASKER

Hi Ryan,
thanks for the update. I am currently running with .NET Framework 4.5.2 so "Help" feature is not available. When I enter the following into browser:   http://xx.xx.xx.xxx/DCRules2Alias/Service.svc/MobileRegistration?userId=TESTUSER&enterpriseId=TESTENTERPRISE&deviceId=TESTDEVICE&qrcode=TESTQRCODE    - I get a HTTP 400  Bad request error.

If I enter just http://80.93.26.243/DCRules2Alias/Service.svc  I get the standard Service page displayed where I can view the wsdl:

You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

svcutil.exe http://xx.xx.xx.xxx/DCRules2Alias/Service.svc?wsdl
You can also access the service description as a single file:

http://xx.xx.xx.xxx/DCRules2Alias/Service.svc?singleWsdl
This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:

C#
class Test
{
    static void Main()
    {
        TransactionClient client = new TransactionClient();
        // Use the 'client' variable to call operations on the service.
        // Always close the client.
        client.Close();
    }
}

Visual Basic
Class Test
    Shared Sub Main()
        Dim client As TransactionClient = New TransactionClient()
        ' Use the 'client' variable to call operations on the service.
        ' Always close the client.
        client.Close()
   End Sub
End Class

regards
Pat
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Ryan,
finally got it working - thanks. It was your comment about the URL path being correct but wrong parameters that put me on the right path. The Crux of the problem was that I have defined just 1 service but was trying to process both SOAP and REST  access through the same service. Once I created a new service and moved all of the REST  (webHttp) processes to this  new Service then I cas able to successfully call the webservice via . http://xx.xx.xx.xxx/DCRules2Alias/Service.svc/web/MobileRegistration2/AAA/BBB/CCC/DDD

I now have two versions of the web service  (MobileRegistration & MobileRegistration2). The 1st one runs under the original SOAP service ITransaction and the 2nd under the REST service ITransaction2

regards
Pat
glad to help

I now have two versions of the web service  (MobileRegistration & MobileRegistration2). The 1st one runs under the original SOAP service ITransaction and the 2nd under the REST service ITransaction2
yea... that's cool.