php - how to run xml request on wsdl url

131

I am having following request

    <?xml version="1.0" ?> 
         <Root Code="3121" Name="PrivateCarInsurancePolicy">
            <ProposalDetails>
             <RiskDetails>
             <Block>
            <PropRisks_AuthorityLocation Type="String" Value="MUMBAI" />
            <PropRisks_ChassisNumber Type="String" Value="C333333" />
            <PropRisks_CompulsoryPAwithOwnerDriver Type="Boolean" Value="True" />
            <PropRisks_CubicCapacity Type="Double" Value="1498" />
            <PropRisks_DateofRegistration Type="String" Value="26/02/2016" />
            <PropRisks_Engineno Type="String" Value="E333333" />
            <PropRisks_FuelType Type="String" Value="Diesel" />
            <PropRisks_FuelTypeGLMConsmCvr Type="Double" Value="1.18" />
            <PropRisks_FuelTypeGLMDepCvr Type="Double" Value="1.47" />
            <PropRisks_FuelTypeGLMEngProt Type="Double" Value="1.28" />
            <PropRisks_FuelTypeGLMMultiplier Type="Double" Value="1.16" />
            <PropRisks_FuelTypeGLMRetInv Type="Double" Value="1.38" />
            <PropRisks_InsuredHasDrivinglicense Type="Boolean" Value="True" />
            <PropRisks_MainDriver Type="String" Value="Self - Owner Driver" />
            <PropRisks_ManufactureYear Type="Double" Value="2016" />
            <PropRisks_ManufacturerCode Type="String" Value="5" />
            <PropRisks_Model Type="String" Value="ECO SPORT" />
            <PropRisks_ModelVariant Type="String" Value="1.5D AMBIENTE MT " />
            <PropRisks_RegistrationNumber Type="String" Value="MH" />
            <PropRisks_RegistrationNumber2 Type="String" Value="01" />
            <PropRisks_RegistrationNumber3 Type="String" Value="SA" />
            <PropRisks_RegistrationNumber4 Type="String" Value="4102" />
            <PropRisks_RegistrationNumber5 Type="String" Value="" />
            <PropRisks_Relationship Type="String" Value="OTHERS" />
            <PropRisks_SeatingCapacity Type="Double" Value="5" />
            <PropRisks_Typeofbody Type="String" Value="" />
            <PropRisks_VehicleSegment Type="String" Value="" />
            <OwnerDriverNomineeDetails Name="OwnerDriverNomineeDetails" Value="GRP292">
            <OwnerDriverNomineeDetails Type="GroupData">
                <Nominee Name="Nominee" Value="qqqqq" Type="String" />
                <NomineeDOB Name="NomineeDOB" Value="01/01/2001" Type="String" />
                <Age Name="Age" Value="16" Type="Double" />
                <Relationship Name="Relationship" Value="OTHERS" Type="String" />
                <Nameofappointee Name="Nameofappointee" Value="rrrrr" Type="String" />
                <Relationshiptonominee Name="Relationshiptonominee" Value="Dependent Son" Type="String" />
            </OwnerDriverNomineeDetails>
        </OwnerDriverNomineeDetails>

        <PropCustomerDtls_CustomerID_Mandatary Type="String" Value="1000010399" />
        <PropCustomerDtls_CustomerName Type="String" Value="SANKET CHANDRASHEKHAR GADKARI" />
        <PropEndorsementDtls_DoubleINSOption Type="String" Value="Automatic" />
        <PropGeneralNodes_ApplicationDate Type="String" Value="26/02/2016" />
        <PropGeneralProposalInformation_BranchOfficeCode Type="String" Value="90001" />
        <PropGeneralProposalInformation_BusinessType_Mandatary Type="String" Value="New Business" />
        <PropGeneralProposalInformation_OfficeName Type="String" Value="HO" />
        <PropGeneralProposalInformation_PolicySchedule_Mandatary Type="String" Value="Yes" />
        <PropGeneralProposalInformation_PrintingType Type="String" Value="With Policy Wording" />
        <PropGeneralProposalInformation_ProposalDate_Mandatary Type="String" Value="26/02/2016" />
        <PropGeneralProposalInformation_Sector_Mandatary Type="String" Value="Urban" />
        <PropIntermediaryDetails_IntermediaryCode Type="String" Value="3101780000" />
        <PropIntermediaryDetails_IntermediaryName Type="String" Value="BAS EK  KING RAJPUT" />
        <PropPolicyEffectivedate_Fromdate_Mandatary Type="String" Value="26/02/2016" />
        <PropPolicyEffectivedate_Fromhour_Mandatary Type="String" Value="18:11" />
        <PropPolicyEffectivedate_Todate_Mandatary Type="String" Value="25/02/2017" />
        <PropPolicyEffectivedate_Tohour_Mandatary Type="String" Value="23:59" />





        </Block>
    </RiskDetails>
</ProposalDetails>

and I am having following URL to run

http://14.141.253.242/GCIntegrationServices/PartnerIntegrationService.svc?wsdl

I tried on soap with POST method and header Content-Type : text/xml
in body part I have paste xml but it gives me bad request .

if I change Content-Type it gives me an error.

The server cannot service the request because the media type is unsupported.

does we required any soap tag????

533

Answer

Solution:

If you're trying to send the request with PHP you should use the PHP SOAP client.

http://php.net/manual/en/book.soap.php

If you're just trying to send messages to the API to test it you can use a GUI SOAP client such as SoapUI.

https://www.soapui.org/

People are also looking for solutions to the problem: php - "GenericError" when trying to transfer money to bank

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.