Not getting the required SOAP request XML

后端 未结 2 1887
梦如初夏
梦如初夏 2021-01-27 01:05

I am working on a Simple php Client that uses OCPP (Open Charge Point Protocol). I have created the client and This is the request XML that goes from my code.

&l         


        
2条回答
  •  温柔的废话
    2021-01-27 01:22

    According to OCPP specs, your current output is closer to what's correct but still has many problems.

    • The full OCPP URN you're using ends with .../2015/10/ which is for OCPP 1.6 but in your code, you're using WSDL for OCPP 1.5 which requires .../2012/06/ for URN.
    • Per OCPP spec, camel-case idTag is correct field name for Authorize message.
    • You need the root tag in the SOAP body.
    • You need WSA (addressing) namespace xmlns:wsa="http://www.w3.org/2005/08/addressing" for addressing fields (MessageId, From, To, ReplyTo, RelatesTo and Action in the SOAP header.
    • chargeBoxIdentity belongs to OCPP URN namespace.
    • MessageId should be MessageID and it should not have mustUnderstand attribute.
    • Action, To, ReplyTo and chargeBoxIdentity should have mustUnderstand="true" attribute. Others should not.
    • As of OCPP 1.6 ReplyTo is required and should always have the value http://www.w3.org/2005/08/addressing/anonymous
    • RelatesTo is required for responses only. This is a request.

    Final version of the expected output should be like below:

    
    
        
            XXX01
            /Authorize
            123
            http://from-endpoint
            http://www.w3.org/2005/08/addressing/anonymous
            http://to-endpoint
        
        
            
                1234567
            
        
    
    

    Note: I've set a bit meaningful namespace prefixes, you can set anything you like.

提交回复
热议问题