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

Add a namespace fix to get 1.6 soap request through #30

Merged
merged 3 commits into from
Feb 20, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ java-docs
*.project
*.settings/
*.classpath

# Should be ignored when using IDE-independent build system such as Maven or Gradle
.idea/
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ public static String getHeaderValue(SOAPMessage message, String tagName) {
try {
SOAPHeader header = message.getSOAPPart().getEnvelope().getHeader();
NodeList elements = header.getElementsByTagNameNS("*", tagName);
if (elements.getLength() > 0)
value = elements.item(0).getChildNodes().item(0).getNodeValue();
if (elements.getLength() > 0) {
value = elements.item(0).getChildNodes().item(0).getTextContent();
}
} catch (SOAPException e) {
logger.warn("getHeaderValue() failed", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public SOAPMessage incomingRequest(SOAPMessageInfo messageInfo) {
});
ISession sessionDecorator = new TimeoutSessionDecorator(timeoutTimer, session);

SessionInformation information = new SessionInformation.Builder().Identifier(identity).InternetAddress(messageInfo.getAddress()).build();
SessionInformation information = new SessionInformation.Builder().Identifier(identity).InternetAddress(messageInfo.getAddress()).SOAPtoURL(toUrl).build();
events.newSession(session, information);
chargeBoxes.put(identity, webServiceReceiver);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ of this software and associated documentation files (the "Software"), to deal
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED)
@XmlSchema(
elementFormDefault = XmlNsForm.QUALIFIED,
namespace="urn://Ocpp/Cs/2015/10/",
xmlns={
@XmlNs(namespaceURI = "urn://Ocpp/Cs/2015/10/", prefix = "ns")
})
package eu.chargetime.ocpp.model.core;

import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;