Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namespaces appearing on both the opening and closing of xml tags instead of just the opening tag #27

Open
NegassaB opened this issue Oct 19, 2022 · 0 comments

Comments

@NegassaB
Copy link

Hello all, thank you for this wonderful library. I have been using it for the past 3 weeks now and it's a blessing.

When working with namespaces in creating an xml it inserts the namespaces to both the opening and closing of the namespaced xml tags (details provided below). Is there a way to remove the namespace from the closing of the namespaced xml tag?

{
    "soapenv:Envelope xmlns:'http://schemas.xmlsoap.org/soap/envelope/' xmlns:loc='http://www.csapi.org/schema/osg/ussd/notification_manager/v1_0/local'": {
        "soapenv:Body": {
            "loc:startUSSDNotification": [
                {
                    "loc:reference": {
                        "correlator": "09876",
                        "endpoint": "http://172.16.130.193:8080/ussd"
                    },
                    "loc:ussdServiceActivationNumber": "9475"
                }
                ]
            },
            "soapenv:Header": {
                "tns:RequestSOAPHeader xmlns:tns='http://www.huawei.com.cn/schema/common/v2_1'":{
                    "tns:serviceId": "35000001000029",
                    "tns:spId": "015363",
                    "tns:spPassword":"278b129b3a1db993b615825f0b04dfb2",
                    "tns:timeStamp": "20221019121812"
                }
            }
        }
}

which comes out to:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:'http://schemas.xmlsoap.org/soap/envelope/' xmlns:loc='http://www.csapi.org/schema/osg/ussd/notification_manager/v1_0/local'>
    <soapenv:Header>
        <tns:RequestSOAPHeader xmlns:tns='http://www.huawei.com.cn/schema/common/v2_1'>
            <tns:spId>015363</tns:spId>
            <tns:spPassword>278b129b3a1db993b615825f0b04dfb2</tns:spPassword>
            <tns:serviceId>35000001000029</tns:serviceId>
            <tns:timeStamp>20221019121812</tns:timeStamp>
        </tns:RequestSOAPHeader xmlns:tns='http://www.huawei.com.cn/schema/common/v2_1'>
    </soapenv:Header>
    <soapenv:Body>
        <loc:startUSSDNotification>
            <loc:reference>
                <endpoint>http://172.16.130.193:8080/ussd</endpoint>
                <correlator>09876</correlator>
            </loc:reference>
            <loc:ussdServiceActivationNumber>9475</loc:ussdServiceActivationNumber>
        </loc:startUSSDNotification>
    </soapenv:Body>
</soapenv:Envelope xmlns:'http://schemas.xmlsoap.org/soap/envelope/' xmlns:loc='http://www.csapi.org/schema/osg/ussd/notification_manager/v1_0/local'>

when it should have been as so:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:'http://schemas.xmlsoap.org/soap/envelope/' xmlns:loc='http://www.csapi.org/schema/osg/ussd/notification_manager/v1_0/local'>
    <soapenv:Header>
        <tns:RequestSOAPHeader xmlns:tns='http://www.huawei.com.cn/schema/common/v2_1'>
            <tns:spId>015363</tns:spId>
            <tns:spPassword>278b129b3a1db993b615825f0b04dfb2</tns:spPassword>
            <tns:serviceId>35000001000029</tns:serviceId>
            <tns:timeStamp>20221019121812</tns:timeStamp>
        </tns:RequestSOAPHeader>
    </soapenv:Header>
    <soapenv:Body>
        <loc:startUSSDNotification>
            <loc:reference>
                <endpoint>http://172.16.130.193:8080/ussd</endpoint>
                <correlator>09876</correlator>
            </loc:reference>
            <loc:ussdServiceActivationNumber>9475</loc:ussdServiceActivationNumber>
        </loc:startUSSDNotification>
    </soapenv:Body>
</soapenv:Envelope>

how do I remove the namespaces from the closing tags?

with the utmost gratitude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant