标签: soap

如何打印此嵌套 stdClass 对象中的数据?

我正在尝试打印此嵌套 stdClass 对象中的值,但访问它们时遇到问题。例如,如何打印“originCity”的值?

stdClass Object (
    [FlightInfoResult] => stdClass Object (
        [next_offset] => 1 
        [flights] => stdClass Object (
            [ident] => SWA2558
            [aircrafttype] => B737
            [filed_ete] => 00:50:00
            [filed_time] => 1362879561
            [filed_departuretime] => 1362880080
            [filed_airspeed_kts] => 442
            [filed_airspeed_mach] => 
            [filed_altitude] => 410
            [route] => LBY MEI J31 VUZ
            [actualdeparturetime] => 1362880080
            [estimatedarrivaltime] => 1362882900
            [actualarrivaltime] => 1362882600
            [diverted] => [origin] => KMSY
            [destination] => KBHM
            [originName] => New Orleans Intl
            [originCity] => New Orleans, LA
            [destinationName] => Birmingham-Shuttlesworth Intl
            [destinationCity] …
Run Code Online (Sandbox Code Playgroud)

php soap stdclass

0
推荐指数
1
解决办法
5718
查看次数

QuickBooks Web 连接器使用 PHP SOAP 服务器进行身份验证

我只是想了解 QBWC 验证过程。我正在尝试用 PHP 构建一个真正的基本 SOAP 服务器,该服务器仅对 QBWC 请求进行身份验证。

这是我的 WSDL:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://developer.intuit.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://developer.intuit.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">WebService for QBFS created using ASP.NET to troubleshoot QuickBooks WebConnector</wsdl:documentation>
<wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://developer.intuit.com/">
        <s:element name="serverVersion">
            <s:complexType />
        </s:element>
        <s:element name="serverVersionResponse">
            <s:complexType>
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="serverVersionResult" type="s:string" />
                </s:sequence>
            </s:complexType>
        </s:element>
        <s:element name="clientVersion">
            <s:complexType>
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="strVersion" type="s:string" />
                </s:sequence>
            </s:complexType>
        </s:element>
        <s:element name="clientVersionResponse">
            <s:complexType>
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="clientVersionResult" type="s:string" …
Run Code Online (Sandbox Code Playgroud)

php quickbooks soap web-services intuit-partner-platform

0
推荐指数
1
解决办法
2854
查看次数

从 Node.js 调用 SOAP 服务

我刚刚开始使用 Node.js,并且尝试使用 Node Soap 扩展来使用 SOAP 服务。我现在只是使用示例服务调用,但似乎无法启动并运行它。

var soap = require('soap');
var fs = require('fs');

reqURL = fs.readFile('www.webservicex.net/stockquote.asmx?WSDL', 'UTF-8', function(err, data){
    if(err) console.log(err)
        soap.createClient(data, function(err, client){
            client.StockQuote.StockQuoteSoap.GetQuote({symbol:'NKE'}, function(err, response){
                if(err) console.log(err);
                    console.log(response);
            });
            console.log('Here is the SOAP sent to ' + data + client.lastrequest);
        });
});
Run Code Online (Sandbox Code Playgroud)

这是我收到的错误:

{ [Error: ENOENT, open 'c:\dev\workspace\WebDevClass\node\www.webservicex.net\st
ockquote.asmx?WSDL']
  errno: -4058,
  code: 'ENOENT',
  path: 'c:\\dev\\workspace\\WebDevClass\\node\\www.webservicex.net\\stockquote.
asmx?WSDL' }
fs.js:491
  binding.open(pathModule._makeLong(path),
          ^
TypeError: path must be a string
    at TypeError (native)
    at Object.fs.open (fs.js:491:11)
    at Object.fs.readFile (fs.js:262:6)
    at …
Run Code Online (Sandbox Code Playgroud)

javascript soap web-services node.js

0
推荐指数
1
解决办法
5458
查看次数

如何使用 Laravel 和 PHP 将数据发送到 SOAP Web 服务

我尝试使用 Laravel 将 XML 空缺职位发送到 Web 服务,但我正在努力弄清楚如何连接到 Web 服务、授权和发送所需的数据。

我尝试过使用curl,但我得到了

错误:“” - 代码:0

下面是我的代码

$result // IS MY XML file

$username = 'username'
$password = 'password'
$URL = 'http://xxxxxx.com;

//setting the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,"xmlRequest=" . $result);
curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_exec($ch);

if(!curl_exec($ch)){
    die('Error: "' . curl_error($ch) . '" - Code: ' …
Run Code Online (Sandbox Code Playgroud)

php xml curl soap laravel

0
推荐指数
1
解决办法
2万
查看次数

PHP 解析 SOAP XML 响应

namespaces尽管我尝试使用simpleXML 但仍然没有结果,但我不知道如何解析此 XML 响应...有什么想法吗?

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header />
    <SOAP-ENV:Body>
        <ns3:GetDistrictByAddressResponse xmlns:ns3="http://il/co/bar/webservices/getdistrictbyaddress">
            <TimeFrameTable>
                <CustomerNumber>250</CustomerNumber>
                <Row>
                    <WindowDate>10052016</WindowDate>
                    <WeekDay>Sunday</WeekDay>
                    <FromHour>1130</FromHour>
                    <ToHour>1430</ToHour>
                </Row>
                <Row>
                    <WindowDate>10052016</WindowDate>
                    <WeekDay>Sunday</WeekDay>
                    <FromHour>1430</FromHour>
                    <ToHour>1730</ToHour>
                </Row>
            </TimeFrameTable>
        </ns3:GetDistrictByAddressResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)

php xml soap simplexml

0
推荐指数
1
解决办法
7192
查看次数

SoapFaultClientException:输出详细信息

我有一个 org.springframework.ws.soap.client.SoapFaultClientException 对象。我想获取其中包含的详细信息以用于记录目的,但我发现很难确定如何执行此操作。

exception.getFaultStringOrReason() 方法会给我一个基本的错误信息。但是,我需要获取包含在对象故障详细信息中的更多详细信息。SOAP 响应如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <faultcode>soap:Client</faultcode>
  <faultstring>The values from the client failed to pass validation.</faultstring>
  <detail>
    <Errors>
      <Error reason="Required on input.">
        <ErrorLocation>
          <Node level="1" name="MyElement"/>
          <Node level="2" name="MyField"/>
        </ErrorLocation>
        <Parameters/>
        <StackTrace/>
      </Error>
    </Errors>
  </detail>
</soap:Fault>
Run Code Online (Sandbox Code Playgroud)

我已经遍历了许多 org.springframework.ws.soap.SoapFaultDetailElement 对象,但我无法获取其中包含的详细信息。这能做到吗?

提前感谢您的任何帮助

java spring soap

0
推荐指数
1
解决办法
2240
查看次数

SchemaCollection 上的多个 XSD:schemaElement 不能为空?

我正在尝试SchemaCollection在我的 Web 服务配置中使用 。但是当我为此添加代码时,我收到此错误:

引起:java.lang.IllegalArgumentException:schemaElement 不能为空!您是否运行 afterPropertiesSet() 或将其注册为 Spring bean?

这个错误是什么意思?查看Spring 代码,与schemaElementXSD 上的有关,但我无法说出什么。

没有 schemaCollection,一切正常。

完整错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pedidos' defined in class path resource [br/com/company/rdt/config/WebServiceConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: schemaElement must not be null! Did you run afterPropertiesSet() or register this as a Spring bean?
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) …
Run Code Online (Sandbox Code Playgroud)

schema spring xsd soap web-services

0
推荐指数
1
解决办法
2315
查看次数

使用 NTLM 身份验证的 SOAP Web 服务调用不起作用 C#

我正在尝试使用 NTLM 身份验证进行 SOAP Web 服务调用,但它不起作用。

我使用了 WSDL 服务。

到目前为止我做了什么:

BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress address = new EndpointAddress("http://uri.test/");
_client = new TEST_PortClient(binding, address);

if (_client.ClientCredentials != null)
{
  _client.ClientCredentials.Windows.AllowNtlm = true; // this method is deprecated
  _client.ClientCredentials.Windows.ClientCredential.UserName = "username";
  _client.ClientCredentials.Windows.ClientCredential.Password = "password";
}
_client.Open(); // this works successfully
string message = string.Empty;
if (_client.TestConnection(ref message)) // this throw an exception *
{
  // do something
}
Run Code Online (Sandbox Code Playgroud)

抛出的异常是:

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The …

c# soap wsdl

0
推荐指数
1
解决办法
2315
查看次数

Spring boot - 服务器无法识别 HTTP Header SOAPAction 的值

我想使用 jaxb 使用肥皂服务。jaxb 生成的请求是

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
      <ns2:Add xmlns:ns2="http://tempuri.org/">
         <ns2:intA>10</ns2:intA><ns2:intB>20</ns2:intB>
      </ns2:Add>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)

但是响应是标题中所述的soap异常。

Caused by: org.springframework.ws.soap.client.SoapFaultClientException: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
   at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
   at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
Run Code Online (Sandbox Code Playgroud)

下面是我的肥皂配置代码。源码示例:https : //howtodoinjava.com/spring-boot/spring-soap-client-webservicetemplate/

    public class ConsumeSoapApplication {
            public static String wsdlurl = "http://www.dneonline.com/calculator.asmx?wsdl";
            public static void main(String[] args) {
                try {
                    JAXBContext.newInstance(com.dxc.service.soap.service.calc.ObjectFactory.class.getPackage().getName(),
                            com.dxc.service.soap.service.calc.ObjectFactory.class.getClassLoader());
                } catch (JAXBException e) {
                    // TODO Auto-generated catch block …
Run Code Online (Sandbox Code Playgroud)

soap web-services jaxb jaxb2-maven-plugin spring-boot

0
推荐指数
1
解决办法
2487
查看次数

SOAP API 获取 Cookie

我正在使用 SOAP API 来获取带有应该返回的 cookie 的身份验证密钥。

from zeep import Client
client = Client("AuthenticationService.xml")
result = client.service.ValidateUser(username, password, "")
result
Run Code Online (Sandbox Code Playgroud)

然而,结果是,我得到了 True 布尔值,但没有包含身份验证密钥的 Cookie。

从下图中,您可以看到使用 SoapUI 的同一请求返回一个 cookie。我想知道如何在 Python 中做到这一点。

SoapUI 软件响应

python soap wsdl soapui zeep

0
推荐指数
1
解决办法
581
查看次数

将wsdl文件制作成java时缺少"soap:fault"元素异常

她有//路径/ a/wsdl文件,我正在努力生成webservices客户端程序,但是当我们添加文件时,它显示以下错误

示例wsdl: wsdl:definitions targetNamespace ="http://xyz.com/"xmlns:tns ="http://xyz.com/"xmlns:cmn ="http://xyz.com/Common/"xmlns: wsdl ="http://schemas.xmlsoap.org/wsdl/"xmlns:xsd ="http://www.w3.org/2001/XMLSchema"xmlns:soap ="http://schemas.xmlsoap.org/ wsdl/soap /"xmlns:soap12 ="http://schemas.xmlsoap.org/wsdl/soap12/"xmlns:xmime ="http://www.w3.org/2005/05/xmlmime">

        <s:element name="GetPublisherRevenueCSV">
            <s:complexType>
                <s:sequence>
                    <s:element minOccurs="1" maxOccurs="1" name="name" type="s:string" />
                    <s:element minOccurs="1" maxOccurs="1" name="pwd" type="s:string" />
                    <s:element minOccurs="1" maxOccurs="1" name="operatorId" type="s:int" />
                    <s:element minOccurs="1" maxOccurs="1" name="criteria" type="tns:PublisherRevenueCriteria" />
                </s:sequence>
            </s:complexType>
        </s:element>

        <s:element name="GetPublisherRevenueCSVResponse">
            <s:complexType>
                <s:sequence>
                    <s:element minOccurs="0" name="CSVFile" type="tns:CSVFile" />
                </s:sequence>
            </s:complexType>
        </s:element>

        <s:complexType name="CSVFile">
            <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="File" type="s:hexBinary"
                    xmime:expectedContentTypes="text/plain" />
            </s:sequence>
        </s:complexType>


        <s:complexType name="PublisherRevenueCriteria">
            <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="publisherId" type="s:int" /> …
Run Code Online (Sandbox Code Playgroud)

java axis soap web-services

-3
推荐指数
1
解决办法
8034
查看次数

从WSDL生成Java Web服务客户端

是否可以使用WSDL文件(从本地文件系统)生成java Web服务客户端?

我正在使用siebel和Java.siebel开发人员发给我一个WSDL文件,我需要生成java web-service客户端.如何使用保存在桌面上的WSDL文件生成客户端,就像普通文件一样?

我知道如何使用eclipse在Java中生成Web服务客户端,但是eclipse正在寻找一个WSDL URL.哪个siebel无法提供.

还有其他选择吗?

java soap web-services siebel

-3
推荐指数
1
解决办法
2545
查看次数