Skip to content

incorrect packet generated #968

@mohsin16432

Description

@mohsin16432

i am facing issue with strong soap 4.1.8. it is not generating soap request as accepted by server.

working soap request:

<soapenv:Envelope
	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:api="http://abc.xyz.com/synccpsinterface/api_requestmgr"
	xmlns:req="http://abc.xyz.com/synccpsinterface/request"
	xmlns:cus="http://abc.xyz.com/cpsinterface/customizedrequest">
	<soapenv:Header/>
	<soapenv:Body>
		<api:Request>
			<req:Header>
                         </req:Header>
                 </api:Request>
	</soapenv:Body>
</soapenv:Envelope>

code generated soap request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Header/>
	<soap:Body>
		<ns1:Request
			xmlns:ns1="http://abc.xyz.com/cpsinterface/api_requestmgr">
			<ns2:Header
				xmlns:ns2="http://abc.xyz.com/cpsinterface/request">
				<ns2:Version>1.0</ns2:Version>
			</ns2:Header>
			<ns2:Body
				xmlns:ns2="http://abc.xyz.con/cpsinterface/request">
				<ns2:ExtentedRequest>
					<ns3:QIIRV2
						xmlns:ns3="http://abc.xyz.com/cpsinterface/customizedrequest">
						
					</ns3:QIIRV2>
				</ns2:ExtentedRequest>
			</ns2:Body>
		</ns1:Request>
	</soap:Body>
</soap:Envelope>

i tried

wsdl_options: {
                overrideRootElement: {
                    namespace: 'http://schemas.xmlsoap.org/soap/envelope/',
                    xmlnsAttributes: [
                        { name: 'xmlns:soapenv', value: 'http://schemas.xmlsoap.org/soap/envelope/' },
                        { name: 'xmlns:api', value: 'http:///cpsinterface/api_requestmgr' },
                        { name: 'xmlns:req', value: 'http://cpsinterface/request' },
                        { name: 'xmlns:cus', value: 'http:///cpsinterface/customizedrequest' },
                    ],
                },
                useEmptyTag: false,
                preserveWhitespace: true,
            },
            SOAPAction: '"http:///cpsinterface/api_requestmgr/APIRequest"', // SOAPAction for the operation
            httpHeaders: {
                'Content-Type': 'text/xml; charset=utf-8', // SOAP 1.1 Content-Type
            }

                    client.addSoapHeader('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'); 

but nothing is working

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions