lula / ngx-soap

Simple SOAP client for Angular
MIT License
66 stars 61 forks source link

Call to method is not working #69

Closed nimartin closed 4 years ago

nimartin commented 4 years ago

HI,

The wsdl : http://greenserv-vcv.greenspark.fr:9000/jsb-ws/WebServiceVCV?wsdl

i'm trying to use your project to call my webservice, try it before with php and the generated request was :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns1="WebServiceVCV">
    <SOAP-ENV:Body>
        <ns1:GetMultipleArticle HashKey="ggfdggf" PublicKey="dfgdfg" LastUpdate="0"/>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

With your plugin the generated request is :

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:sch0="WebServiceVCV" 
    xmlns:sch1="http://www.jeeves.se/schema/failure" 
    xmlns:tns="WebServiceVCV" 
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb" 
    xmlns:q1="WebServiceVCV" 
    xmlns:fail="http://www.jeeves.se/schema/failure">
    <soap:Body>
        <GetMultipleArticle xmlns="WebServiceVCV">
            <ns1:HashKey>dfgdfg</ns1:HashKey>
            <ns1:PublicKey>dfgdfg</ns1:PublicKey>
            <ns1:LastUpdate>0</ns1:LastUpdate>
        </GetMultipleArticle>
    </soap:Body>
</soap:Envelope>

And the following error : The request sent by the client was syntactically incorrect ().

I tried to change some options and finally come to this :

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:sch0="WebServiceVCV" 
    xmlns:sch1="http://www.jeeves.se/schema/failure" 
    xmlns:tns="WebServiceVCV" 
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb" 
    xmlns:q1="WebServiceVCV" 
    xmlns:fail="http://www.jeeves.se/schema/failure">
    <soap:Body>
        <GetMultipleArticle xmlns="WebServiceVCV">
            <HashKey>d1ec41d021965e45a5e0a6b4b629ff05</HashKey>
            <PublicKey>c7c4f1a054a8d43a9325f94106df61fd</PublicKey>
            <LastUpdate>0</LastUpdate>
        </GetMultipleArticle>
    </soap:Body>
</soap:Envelope>

I tried it on SOAP UI and the solution was to have :

<GetMultipleArticle xmlns="WebServiceVCV" HashKey="df" PublicKey="dfdf" LastUpdate="dfdf">
</GetMultipleArticle>

But i don't find a way to do this with your plugin...

Have you an idea ?

lula commented 4 years ago

Hi @nimartin please check node-soap repo to see how to add custom attributes. You should be able to do the same as this is a porting of that lib for browser. I'm closing the issue, for now for that reason. Reopen it in case it's working with node-soap and not working with this lib. Cheers!